From cb2d2d1ce07b75db20c53dfd2bf898625f2b82ee Mon Sep 17 00:00:00 2001 From: provira Date: Tue, 18 Feb 2025 15:00:58 +0100 Subject: [PATCH 001/108] feat: refs #8612 changed shelving to VnTable & created e2e tests --- src/pages/Shelving/ShelvingList.vue | 166 ++++++++++++------ src/router/modules/shelving.js | 9 - .../parking/parkingBasicData.spec.js | 0 .../parking/parkingList.spec.js | 0 .../shelving/shelvingBasicData.spec.js | 20 +++ .../integration/shelving/shelvingList.spec.js | 32 ++++ 6 files changed, 166 insertions(+), 61 deletions(-) rename test/cypress/integration/{ => shelving}/parking/parkingBasicData.spec.js (100%) rename test/cypress/integration/{ => shelving}/parking/parkingList.spec.js (100%) create mode 100644 test/cypress/integration/shelving/shelvingBasicData.spec.js create mode 100644 test/cypress/integration/shelving/shelvingList.spec.js diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue index 4e0c21100..4af1e4e7d 100644 --- a/src/pages/Shelving/ShelvingList.vue +++ b/src/pages/Shelving/ShelvingList.vue @@ -1,25 +1,60 @@ + + + + + es: + shelving: + list: + parking: Estacionamiento + priority: Prioridad + + summary: + recyclable: Reciclable + en: + shelving: + list: + parking: Parking + priority: Priority + + summary: + recyclable: Recyclable + diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js index c085dd8dc..94ff274dc 100644 --- a/src/router/modules/shelving.js +++ b/src/router/modules/shelving.js @@ -111,15 +111,6 @@ export default { shelvingCard, ], }, - { - path: 'create', - name: 'ShelvingCreate', - meta: { - title: 'shelvingCreate', - icon: 'add', - }, - component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'), - }, { path: 'parking', name: 'ParkingMain', diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js similarity index 100% rename from test/cypress/integration/parking/parkingBasicData.spec.js rename to test/cypress/integration/shelving/parking/parkingBasicData.spec.js diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js similarity index 100% rename from test/cypress/integration/parking/parkingList.spec.js rename to test/cypress/integration/shelving/parking/parkingList.spec.js diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js new file mode 100644 index 000000000..54547463e --- /dev/null +++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js @@ -0,0 +1,20 @@ +/// +describe('ShelvingList', () => { + + const parking = '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container'; + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('developer'); + cy.visit(`/#/shelving/1/basic-data`); + }); + + it('should edit the data and save', () => { + cy.selectOption(parking, 'P-01-1'); + cy.dataCy('Code_input').type('1'); + cy.dataCy('Priority_input').type('10'); + cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click(); + cy.saveCard(); + cy.get('.q-notification__message').should('have.text', 'Data saved'); + + }); +}); \ No newline at end of file diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js new file mode 100644 index 000000000..1a792c3d1 --- /dev/null +++ b/test/cypress/integration/shelving/shelvingList.spec.js @@ -0,0 +1,32 @@ +/// +describe('ShelvingList', () => { + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('developer'); + cy.visit(`/#/shelving/list`); + }); + + it('should redirect on clicking a shelving', () => { + cy.get('#searchbar input').type('{enter}'); + cy.get(':nth-child(2) > .q-card').click(); + cy.url().should('include', '/shelving/2/summary'); + }); + + it('should filter and redirect if only one result', () => { + cy.selectOption('[data-cy="Parking_select"]', 'P-02-2'); + cy.dataCy('Parking_select').type('{enter}'); + cy.url().should('match', /\/shelving\/\d+\/summary/); + }); + + it('should create a new shelving', () => { + cy.dataCy('vnTableCreateBtn').click(); + cy.dataCy('code-create-popup').type('Test'); + cy.dataCy('Priority_input').type('10'); + cy.selectOption( + '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container', '100-01' + ) + cy.dataCy('FormModelPopup_save').click(); + cy.checkNotification('Data created'); + cy.url().should('match', /\/shelving\/\d+\/basic-data/); + }); +}); From 21d2438c5dacc4a24839f90a09430e46e11c45ac Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 19 Feb 2025 16:15:22 +0100 Subject: [PATCH 002/108] feat: refs #8600 added calendar e2e and modified basic data --- src/pages/Zone/Card/ZoneBasicData.vue | 5 +- .../Zone/Card/ZoneEventInclusionForm.vue | 11 ++-- src/pages/Zone/ZoneCalendar.vue | 1 + src/pages/Zone/ZoneDeliveryPanel.vue | 4 +- .../integration/zone/zoneBasicData.spec.js | 17 +------ .../integration/zone/zoneCalendar.spec.js | 51 +++++++++++++++++++ 6 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 test/cypress/integration/zone/zoneCalendar.spec.js diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue index 03013f011..85733874b 100644 --- a/src/pages/Zone/Card/ZoneBasicData.vue +++ b/src/pages/Zone/Card/ZoneBasicData.vue @@ -29,10 +29,10 @@ const setFilteredAddresses = (data) => {