From 02f682ac0b5d153c43339812b41fab0605c861c3 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 25 Oct 2024 10:53:19 +0200 Subject: [PATCH] perf: refs #6943 #6943 merge command --- test/cypress/integration/client/clientList.spec.js | 2 +- .../integration/route/agency/agencyWorkCenter.spec.js | 2 +- test/cypress/support/commands.js | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/test/cypress/integration/client/clientList.spec.js b/test/cypress/integration/client/clientList.spec.js index f150fc190..22bca15ac 100644 --- a/test/cypress/integration/client/clientList.spec.js +++ b/test/cypress/integration/client/clientList.spec.js @@ -28,7 +28,7 @@ describe('Client list', () => { cy.get('.q-mt-lg > .q-btn--standard').click(); - cy.checkNotification('created'); + cy.checkNotification('Data created'); cy.url().should('include', '/summary'); }); it('Client list search client', () => { diff --git a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js index 311c0130c..fdfcd4286 100644 --- a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js +++ b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js @@ -11,7 +11,7 @@ describe('AgencyWorkCenter', () => { // create cy.get(createButton).click(); cy.get(workCenterCombobox).type('workCenterOne{enter}'); - cy.checkNotification('created'); + cy.checkNotification('Data created'); // expect error when duplicate cy.get(createButton).click(); diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 7d5a44f78..c9b1a748e 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -274,13 +274,7 @@ Cypress.Commands.add('openActions', (row) => { cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click(); }); -Cypress.Commands.add('checkNotification', (tag) => { - const defaultTags = { - created: 'Data created', - updated: 'Data saved', - deleted: 'Data deleted', - }; //last - const text = defaultTags[tag] ?? tag; +Cypress.Commands.add('checkNotification', (text) => { cy.get('.q-notification') .should('be.visible') .last()