From 4a346bd5d00e118a438d15d998cce6703cec40c8 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 2 Oct 2024 22:49:26 +0200 Subject: [PATCH] test: #7679 ItemFixedPrice --- src/pages/Item/ItemFixedPrice.vue | 1 - .../integration/item/ItemFixedPrice.spec.js | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 test/cypress/integration/item/ItemFixedPrice.spec.js diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index 2a7c3a522..97532bf40 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -476,7 +476,6 @@ function handleOnDataSave({ CrudModelRef }) { paginate: false, }" v-model:selected="rowsSelected" - :row-click="saveOnRowChange" :create-as-dialog="false" :create="{ onDataSaved: handleOnDataSave, diff --git a/test/cypress/integration/item/ItemFixedPrice.spec.js b/test/cypress/integration/item/ItemFixedPrice.spec.js new file mode 100644 index 000000000..343ef13f6 --- /dev/null +++ b/test/cypress/integration/item/ItemFixedPrice.spec.js @@ -0,0 +1,35 @@ +/* ==== Test Created with Cypress Studio ==== */ +describe('Worker Create', () => { + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/item/fixed-price', { timeout: 5000 }); + cy.waitForElement('.q-table'); + }); + it('start', function () { + cy.get( + '.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon' + ).click(); + cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click(); + cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click(); + cy.selectOption( + '.q-virtual-scroll__content > :nth-child(2) > :nth-child(1)', + '#15' + ); + cy.get('.q-virtual-scroll__content > :nth-child(2) > :nth-child(3)').type('1'); + cy.get('.q-virtual-scroll__content > :nth-child(2) > :nth-child(4)').type('2'); + cy.selectOption( + '.q-virtual-scroll__content > :nth-child(2) > :nth-child(8)', + 'Warehouse One' + ); + cy.get('.q-notification__message').should('have.text', 'Data saved'); + + cy.get( + '.q-virtual-scroll__content > :nth-child(2) > .text-right > .q-btn > .q-btn__content > .q-icon' + ).click(); + cy.get( + '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block' + ).click(); + cy.get('.q-notification__message').should('have.text', 'Data saved'); + }); +});