From 80a101074677b6d6cd866415051113033ad2e480 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 1 Dec 2024 21:00:04 +0100 Subject: [PATCH] test: refs #6896 #6896 first import missing salix e2e tests --- .../integration/order/01_summary.spec.js | 9 +++++++++ .../integration/order/02_basic_data.spec.js | 12 ++++++++++++ test/cypress/integration/order/03_lines.spec.js | 12 ++++++++++++ .../integration/order/04_catalog.spec.js | 17 +++++++++++++++++ test/cypress/integration/order/05_index.spec.js | 10 ++++++++++ 5 files changed, 60 insertions(+) create mode 100644 test/cypress/integration/order/01_summary.spec.js create mode 100644 test/cypress/integration/order/02_basic_data.spec.js create mode 100644 test/cypress/integration/order/03_lines.spec.js create mode 100644 test/cypress/integration/order/04_catalog.spec.js create mode 100644 test/cypress/integration/order/05_index.spec.js diff --git a/test/cypress/integration/order/01_summary.spec.js b/test/cypress/integration/order/01_summary.spec.js new file mode 100644 index 000000000..1c51ead8b --- /dev/null +++ b/test/cypress/integration/order/01_summary.spec.js @@ -0,0 +1,9 @@ +describe.skip('Order summary path', () => { + beforeEach(() => { + const orderId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/order/${orderId}`); + }); + it('should reach the order summary section and check data', async () => {}); +}); diff --git a/test/cypress/integration/order/02_basic_data.spec.js b/test/cypress/integration/order/02_basic_data.spec.js new file mode 100644 index 000000000..381a8435f --- /dev/null +++ b/test/cypress/integration/order/02_basic_data.spec.js @@ -0,0 +1,12 @@ +describe.skip('Order edit basic data path', () => { + beforeEach(() => { + const orderId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/order/${orderId}`); + }); + describe('when confirmed order', () => {}); + it('should not be able to change the client', async () => {}); + describe('when new order', () => {}); + it('should create an order and edit its basic data', async () => {}); +}); diff --git a/test/cypress/integration/order/03_lines.spec.js b/test/cypress/integration/order/03_lines.spec.js new file mode 100644 index 000000000..483d09d0d --- /dev/null +++ b/test/cypress/integration/order/03_lines.spec.js @@ -0,0 +1,12 @@ +describe.skip('Order lines', () => { + beforeEach(() => { + const orderId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/order/${orderId}`); + }); + it('should check the order subtotal', async () => {}); + it('should delete the first line in the order', async () => {}); + it('should confirm the order subtotal has changed', async () => {}); + it('should confirm the whole order and redirect to ticket index filtered by clientFk', async () => {}); +}); diff --git a/test/cypress/integration/order/04_catalog.spec.js b/test/cypress/integration/order/04_catalog.spec.js new file mode 100644 index 000000000..6115f34ce --- /dev/null +++ b/test/cypress/integration/order/04_catalog.spec.js @@ -0,0 +1,17 @@ +describe.skip('Order catalog', () => { + beforeEach(() => { + const orderId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/order/${orderId}`); + }); + it('should open the create new order form', async () => {}); + it('should create a new order', async () => {}); + it('should add the realm and type filters and obtain results', async () => {}); + it('should perfom an "OR" search for the item tag colors silver and brown', async () => {}); + it('should perfom an "OR" search for the item tag tallos 2 and 9', async () => {}); + it('should perform a general search for category', async () => {}); + it('should perfom an "AND" search for the item tag tallos 2', async () => {}); + it('should remove the tag filters and have 4 results', async () => {}); + it('should search for an item by id', async () => {}); +}); diff --git a/test/cypress/integration/order/05_index.spec.js b/test/cypress/integration/order/05_index.spec.js new file mode 100644 index 000000000..2e9117338 --- /dev/null +++ b/test/cypress/integration/order/05_index.spec.js @@ -0,0 +1,10 @@ +describe.skip('Order Index', () => { + beforeEach(() => { + const orderId = 1; + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit(`/#/order/${orderId}`); + }); + it(`should check the second search result doesn't contain a total of 0€`, async () => {}); + it('should search including empty orders', async () => {}); +});