diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fde87bf58..e8873351d 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -76,13 +76,8 @@ defineExpose({ reset, hasChanges, saveChanges, - getFormData, }); -function getFormData() { - return formData.value; -} - async function fetch(data) { if (data && Array.isArray(data)) { let $index = 0; @@ -202,7 +197,6 @@ function getChanges() { const pk = $props.primaryKey; for (const [i, row] of formData.value.entries()) { - console.log(pk, row); if (!row[pk]) { creates.push(row); } else if (originalData.value) { @@ -217,7 +211,6 @@ function getChanges() { } } const changes = { updates, creates }; - console.log('ddd', changes); for (let prop in changes) { if (changes[prop].length === 0) changes[prop] = undefined; } diff --git a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js index b1c1f6043..376450b7d 100644 --- a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js @@ -3,6 +3,7 @@ describe('InvoiceInCorrective', () => { const createRectificative = '.q-menu > .q-list > :nth-child(4) > .q-item__section'; const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)'; + const saveDialog = '.q-card > .q-card__actions > .q-btn--standard '; it('should create a correcting invoice', () => { cy.login('developer'); @@ -12,7 +13,7 @@ describe('InvoiceInCorrective', () => { cy.openActionsDescriptor(); cy.get(createRectificative).click(); - cy.clickConfirm(); + cy.get(saveDialog).click(); cy.openLeftMenu(); cy.get(rectificativeSection).click(); cy.get('tbody > tr:visible').should('have.length', 1); diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index 9d3adbc73..b96fd0cf2 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -8,8 +8,7 @@ describe('InvoiceInList', () => { beforeEach(() => { cy.login('developer'); - cy.visit(`/#/invoice-in`); - cy.clickFilterSearchBtn(); + cy.visit(`/#/invoice-in/list`); }); it('should redirect on clicking a invoice', () => { diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 4f181ae9e..6d627e631 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -88,7 +88,7 @@ Cypress.Commands.add('addCard', () => { }); Cypress.Commands.add('clickConfirm', () => { cy.waitForElement('.q-dialog__inner > .q-card'); - cy.get('.q-card > .q-card__actions > .q-btn--standard').click(); + cy.get('.q-card__actions > .q-btn--unelevated > .q-btn__content > .block').click(); }); Cypress.Commands.add('notificationHas', (selector, text) => { @@ -184,10 +184,6 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => { cy.get(selector).should('have.text', expectedValue); }); -Cypress.Commands.add('clickFilterSearchBtn', () => { - cy.get('.q-item__section > .q-btn > .q-btn__content > .q-icon').click(); -}); - Cypress.Commands.add('openActionsDescriptor', () => { cy.get('.descriptor > .header > .q-btn').click(); });