From fd09a6bfbe482c0c3a6b6263de8c28b73d880275 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 21 Aug 2024 16:36:45 +0200 Subject: [PATCH] fix: refs #7323 test --- test/cypress/integration/worker/workerCreate.spec.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/cypress/integration/worker/workerCreate.spec.js b/test/cypress/integration/worker/workerCreate.spec.js index c1832ad67eb..50afe189279 100644 --- a/test/cypress/integration/worker/workerCreate.spec.js +++ b/test/cypress/integration/worker/workerCreate.spec.js @@ -2,6 +2,9 @@ describe('WorkerCreate', () => { const externalRadio = '.q-radio:nth-child(2)'; const notification = '.q-notification__message'; const developerBossId = 120; + const payMethodCross = + '.grid-create .full-width > :nth-child(9) .q-select .q-field__append:not(.q-anchor--skip)'; + const saveBtn = '.q-mt-lg > .q-btn--standard'; const internal = { Fi: { val: '78457139E' }, @@ -36,7 +39,8 @@ describe('WorkerCreate', () => { it('should throw an error if a pay method has not been selected', () => { cy.fillInForm(internal); - cy.get('.q-mt-lg > .q-btn--standard').click(); + cy.get(payMethodCross).click(); + cy.get(saveBtn).click(); cy.get(notification).should('contains.text', 'Payment method is required'); }); @@ -45,14 +49,14 @@ describe('WorkerCreate', () => { ...internal, 'Pay method': { val: 'PayMethod one', type: 'select' }, }); - cy.get('.q-mt-lg > .q-btn--standard').click(); + cy.get(saveBtn).click(); cy.get(notification).should('contains.text', 'Data created'); }); it('should create an external', () => { cy.get(externalRadio).click(); cy.fillInForm(external); - cy.get('.q-mt-lg > .q-btn--standard').click(); + cy.get(saveBtn).click(); cy.get(notification).should('contains.text', 'Data created'); }); });