From 5f12f8436bcc01693dc017128ceee5d0b2b5e1f5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Feb 2025 07:59:21 +0100 Subject: [PATCH] fix: refs #8583 basicData timeControl --- src/pages/Worker/Card/WorkerBasicData.vue | 1 + test/cypress/integration/worker/workerBasicData.spec.js | 4 ++++ test/cypress/integration/worker/workerTimeControl.spec.js | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 9012289ad..78142301c 100644 --- a/src/pages/Worker/Card/WorkerBasicData.vue +++ b/src/pages/Worker/Card/WorkerBasicData.vue @@ -98,6 +98,7 @@ async function setAdvancedSummary(data) { option-label="name" option-value="id" v-model="data.originCountryFk" + data-cy="country" /> { const maritalStatusSelect = '[data-cy="MaritalStatus"]'; + const countrySelect = '[data-cy="country"]'; + const country = 'Alemania'; const nif = '42572374H'; const fi = '[data-cy="fi"]'; beforeEach(() => { @@ -11,6 +13,8 @@ describe('WorkerBasicData', () => { it('should modify worker summary', () => { cy.get(maritalStatusSelect).type('Married'); cy.get(fi).type(nif); + cy.get(countrySelect).type(country); cy.saveCard(); + cy.checkNotification('Data saved'); }); }); diff --git a/test/cypress/integration/worker/workerTimeControl.spec.js b/test/cypress/integration/worker/workerTimeControl.spec.js index a72dbaaa9..6b0a1e9f9 100644 --- a/test/cypress/integration/worker/workerTimeControl.spec.js +++ b/test/cypress/integration/worker/workerTimeControl.spec.js @@ -1,5 +1,9 @@ describe('WorkerTimeControl', () => { const pastMonth = '.nav-container > .row > :nth-child(1)'; + const pastDay = + '[aria-label="Monday, December 4, 2000"][style="min-width: 32.2857px; max-width: 32.2857px; width: 32.2857px;"] > .q-calendar-month__day--label__wrapper > .q-calendar-month__day--label'; + const addTime4December = + ':nth-child(2) > :nth-child(1) > .column > .q-btn > .q-btn__content > .q-icon'; beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); @@ -8,6 +12,8 @@ describe('WorkerTimeControl', () => { it('should add some entries', () => { cy.get(pastMonth).click(); + cy.get(pastDay).click(); + cy.get(addTime4December).click(); }); // it('should try descriptors', () => {