From 9721dc957fdb36df0f227b6f218e01eefe598deb Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 9 May 2025 16:01:19 +0200 Subject: [PATCH] refactor: refs #7527 update test descriptions for consistency and add code field in travel thermographs tests --- .../customer/customerAddress.spec.js | 34 +++++++++---------- .../customer/customerBalance.spec.js | 2 +- .../customer/customerBasicData.spec.js | 2 +- .../customer/customerBillingData.spec.js | 2 +- .../customer/customerCredits.spec.js | 2 +- .../integration/customer/customerDms.spec.js | 2 +- .../customer/customerFiscalData.spec.js | 2 +- .../customer/customerGreuges.spec.js | 2 +- .../integration/customer/customerList.spec.js | 2 +- .../customer/customerNotes.spec.js | 2 +- .../customer/customerRecoveries.spec.js | 2 +- .../integration/customer/customerSms.spec.js | 2 +- .../customer/customerWebAccess.spec.js | 2 +- .../travel/travelThermographs.spec.js | 3 +- 14 files changed, 31 insertions(+), 30 deletions(-) diff --git a/test/cypress/integration/customer/customerAddress.spec.js b/test/cypress/integration/customer/customerAddress.spec.js index 8d9d765be..57ae68157 100644 --- a/test/cypress/integration/customer/customerAddress.spec.js +++ b/test/cypress/integration/customer/customerAddress.spec.js @@ -1,11 +1,27 @@ /// -describe('Client consignee', () => { +describe('CustomerAddress (consignee)', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); cy.visit('#/customer/1107/address'); }); + it('Should change default address', () => { + cy.dataCy('setDefaultAddress') + .first() + .should('have.attr', 'style') + .and('include', '"FILL" 1'); + cy.dataCy('setDefaultAddress').last().click(); + cy.dataCy('setDefaultAddress') + .first() + .should('have.attr', 'style') + .and('include', '"FILL" 0'); + cy.dataCy('setDefaultAddress') + .last() + .should('have.attr', 'style') + .and('include', '"FILL" 1'); + }); + it('check as equalizated', () => { cy.get('.q-card__section > .address-card').then(($el) => { const addressCards_before = $el.length; @@ -40,22 +56,6 @@ describe('Client consignee', () => { ).should('have.class', 'q-checkbox__inner--truthy'); }); - it('Should change default address', () => { - cy.dataCy('setDefaultAddress') - .first() - .should('have.attr', 'style') - .and('include', '"FILL" 1'); - cy.dataCy('setDefaultAddress').last().click(); - cy.dataCy('setDefaultAddress') - .first() - .should('have.attr', 'style') - .and('include', '"FILL" 0'); - cy.dataCy('setDefaultAddress') - .last() - .should('have.attr', 'style') - .and('include', '"FILL" 1'); - }); - it('Should edit address', () => { const updateData = { Consignee: { val: 'Stark tower' }, diff --git a/test/cypress/integration/customer/customerBalance.spec.js b/test/cypress/integration/customer/customerBalance.spec.js index fff6a5e04..6ba4be329 100644 --- a/test/cypress/integration/customer/customerBalance.spec.js +++ b/test/cypress/integration/customer/customerBalance.spec.js @@ -1,5 +1,5 @@ /// -describe('Client balance', () => { +describe('CustomerBalance', () => { beforeEach(() => { cy.login('developer'); cy.visit('#/customer/1101/balance'); diff --git a/test/cypress/integration/customer/customerBasicData.spec.js b/test/cypress/integration/customer/customerBasicData.spec.js index 8e0f0f6bd..583742b72 100644 --- a/test/cypress/integration/customer/customerBasicData.spec.js +++ b/test/cypress/integration/customer/customerBasicData.spec.js @@ -1,5 +1,5 @@ /// -describe('Client basic data', () => { +describe('CustomerBasicData', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerBillingData.spec.js b/test/cypress/integration/customer/customerBillingData.spec.js index 16e8fc0fc..4ffb372e0 100644 --- a/test/cypress/integration/customer/customerBillingData.spec.js +++ b/test/cypress/integration/customer/customerBillingData.spec.js @@ -1,5 +1,5 @@ /// -describe('Client billing data', () => { +describe('CustomerBillingData', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerCredits.spec.js b/test/cypress/integration/customer/customerCredits.spec.js index 5f303b40d..4cffeaec5 100644 --- a/test/cypress/integration/customer/customerCredits.spec.js +++ b/test/cypress/integration/customer/customerCredits.spec.js @@ -1,5 +1,5 @@ /// -describe('Client credits', () => { +describe('CustomerCredits', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerDms.spec.js b/test/cypress/integration/customer/customerDms.spec.js index 2334b00ca..b017f6156 100644 --- a/test/cypress/integration/customer/customerDms.spec.js +++ b/test/cypress/integration/customer/customerDms.spec.js @@ -1,4 +1,4 @@ -describe('Customer DMS', () => { +describe('CustomerDms', () => { beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerFiscalData.spec.js b/test/cypress/integration/customer/customerFiscalData.spec.js index 691dc1ad3..7d6d5d318 100644 --- a/test/cypress/integration/customer/customerFiscalData.spec.js +++ b/test/cypress/integration/customer/customerFiscalData.spec.js @@ -1,5 +1,5 @@ /// -describe('Client fiscal data', { testIsolation: true }, () => { +describe('CustomerFiscalData', { testIsolation: true }, () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerGreuges.spec.js b/test/cypress/integration/customer/customerGreuges.spec.js index 23f8b3182..ee564d24e 100644 --- a/test/cypress/integration/customer/customerGreuges.spec.js +++ b/test/cypress/integration/customer/customerGreuges.spec.js @@ -1,5 +1,5 @@ /// -describe('Client greuges', () => { +describe('CustomerGreuges', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerList.spec.js b/test/cypress/integration/customer/customerList.spec.js index 2577462cb..eb70dfeed 100644 --- a/test/cypress/integration/customer/customerList.spec.js +++ b/test/cypress/integration/customer/customerList.spec.js @@ -1,5 +1,5 @@ /// -describe('Client list', { testIsolation: true }, () => { +describe('CustomerList', { testIsolation: true }, () => { beforeEach(() => { cy.login('developer'); cy.visit('/#/customer/list', { diff --git a/test/cypress/integration/customer/customerNotes.spec.js b/test/cypress/integration/customer/customerNotes.spec.js index 99a7c66c5..b5d9537c2 100644 --- a/test/cypress/integration/customer/customerNotes.spec.js +++ b/test/cypress/integration/customer/customerNotes.spec.js @@ -1,5 +1,5 @@ /// -describe('Client notes', () => { +describe('CustomerNotes', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerRecoveries.spec.js b/test/cypress/integration/customer/customerRecoveries.spec.js index ea6f14407..dd5cecbeb 100644 --- a/test/cypress/integration/customer/customerRecoveries.spec.js +++ b/test/cypress/integration/customer/customerRecoveries.spec.js @@ -1,5 +1,5 @@ /// -describe('Client recoveries', () => { +describe('CustomerRecoveries', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerSms.spec.js b/test/cypress/integration/customer/customerSms.spec.js index 5c82fd9a3..fa4582810 100644 --- a/test/cypress/integration/customer/customerSms.spec.js +++ b/test/cypress/integration/customer/customerSms.spec.js @@ -1,5 +1,5 @@ /// -describe('Client notes', () => { +describe('CustomerSms', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/customer/customerWebAccess.spec.js b/test/cypress/integration/customer/customerWebAccess.spec.js index 970aab71c..d11308034 100644 --- a/test/cypress/integration/customer/customerWebAccess.spec.js +++ b/test/cypress/integration/customer/customerWebAccess.spec.js @@ -1,5 +1,5 @@ /// -describe('Client web-access', () => { +describe('CustomerWebAccess', () => { beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); diff --git a/test/cypress/integration/travel/travelThermographs.spec.js b/test/cypress/integration/travel/travelThermographs.spec.js index 0dde38abe..684e17dcb 100644 --- a/test/cypress/integration/travel/travelThermographs.spec.js +++ b/test/cypress/integration/travel/travelThermographs.spec.js @@ -4,6 +4,7 @@ describe('TravelThermographs', () => { editBtn: 'vnTableCell_editFile', removeBtn: 'vnTableCell_removeThermograph', temperatureField: 'vnTableCell_temperatureFk', + codeField: 'vnTableCell_thermographFk', } beforeEach(() => { cy.login('developer'); @@ -26,7 +27,7 @@ describe('TravelThermographs', () => { force: true, }); cy.dataCy('FormModelPopup_save').click(); - cy.checkNotification('Thermograph created'); + cy.dataCy(selectors.codeField).invoke('text').should('contain', data.Thermograph.val); }); it('Should edit thermograph', () => {