From 732683c3403483d23259a4058d093eb2f9f2a28a Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 10 Dec 2024 07:10:55 +0100 Subject: [PATCH] feat: refs #8220 added barcodes e2e test --- .../integration/item/itemBarcodes.spec.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/cypress/integration/item/itemBarcodes.spec.js diff --git a/test/cypress/integration/item/itemBarcodes.spec.js b/test/cypress/integration/item/itemBarcodes.spec.js new file mode 100644 index 000000000..fc32c582e --- /dev/null +++ b/test/cypress/integration/item/itemBarcodes.spec.js @@ -0,0 +1,28 @@ +/// +describe('Item shelving', () => { + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('developer'); + cy.visit(`/#/item/list`); + cy.get('#searchbar input').type('1{enter}'); + }); + + it('should throw an error if the barcode exists', () => { + cy.get('[href="#/item/1/barcode"]').click(); + cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click(); + cy.get( + ':nth-child(4) > div.full-width > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]' + ).type('1111111111{enter}'); + // cuando se haga merge del arreglo de items acabar esto para que muestre error + // cy.checkNotification('Data created'); + }); + + it('should create a new barcode', () => { + cy.get('[href="#/item/1/barcode"]').click(); + cy.get('.q-card > .q-btn > .q-btn__content > .q-icon').click(); + cy.get( + ':nth-child(4) > div.full-width > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]' + ).type('1212121212{enter}'); + // cy.checkNotification('Data created'); + }); +});