From 1a0df60e06878c3695a7011016ec705a3b19dbaa Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 14 Mar 2025 14:21:26 +0100 Subject: [PATCH 1/4] fix: remove reserved ticket functionality from TicketProblems and TicketSaleMoreActions components --- src/components/TicketProblems.vue | 11 ------ .../Ticket/Card/TicketSaleMoreActions.vue | 35 ------------------- 2 files changed, 46 deletions(-) diff --git a/src/components/TicketProblems.vue b/src/components/TicketProblems.vue index c11cc2e7b..aee132fe0 100644 --- a/src/components/TicketProblems.vue +++ b/src/components/TicketProblems.vue @@ -17,17 +17,6 @@ defineProps({ row: { type: Object, required: true } }); - - - {{ t('ticketSale.reserved') }} - - { } return false; }); -const hasReserves = computed(() => props.sales.some((sale) => sale.reserved == true)); const sendSms = async (params) => { await axios.post(`Tickets/${ticket.value.id}/sendSms`, params); @@ -144,14 +143,6 @@ const onCreateClaimAccepted = async () => { push({ name: 'ClaimBasicData', params: { id: data.id } }); }; -const setReserved = async (reserved) => { - const params = { ticketId: ticket.value.id, sales: props.sales, reserved: reserved }; - await axios.post(`Sales/reserve`, params); - props.sales.forEach((sale) => { - sale.reserved = reserved; - }); -}; - const createRefund = async (withWarehouse) => { if (!props.ticket) return; @@ -240,30 +231,6 @@ const createRefund = async (withWarehouse) => { {{ t('Add claim') }} - - - {{ t('Mark as reserved') }} - - - - - {{ t('Unmark as reserved') }} - - {{ t('Refund') }} @@ -309,8 +276,6 @@ es: Recalculate price: Recalcular precio Update discount: Actualizar descuento Add claim: Crear reclamación - Mark as reserved: Marcar como reservado - Unmark as reserved: Desmarcar como reservado Refund: Abono with warehouse: con almacén without warehouse: sin almacén -- 2.40.1 From 26f20440972b8fd42d032e49c580c58bc8b3edb0 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 24 Mar 2025 09:08:18 +0100 Subject: [PATCH 2/4] test: update order creation test and remove reserved ticket tests --- test/cypress/integration/order/orderList.spec.js | 2 +- .../integration/ticket/ticketSale.spec.js | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/test/cypress/integration/order/orderList.spec.js b/test/cypress/integration/order/orderList.spec.js index 1c954622f..024517bbf 100644 --- a/test/cypress/integration/order/orderList.spec.js +++ b/test/cypress/integration/order/orderList.spec.js @@ -6,7 +6,7 @@ describe('OrderList', () => { cy.visit('/#/order/list'); }); - it('create order', () => { + it.only('create order', () => { cy.get('[data-cy="vnTableCreateBtn"]').click(); cy.get('[data-cy="Client_select"]').type('1101'); cy.get('.q-menu').contains('Bruce Wayne').click(); diff --git a/test/cypress/integration/ticket/ticketSale.spec.js b/test/cypress/integration/ticket/ticketSale.spec.js index 61ba9fe4f..514c50281 100644 --- a/test/cypress/integration/ticket/ticketSale.spec.js +++ b/test/cypress/integration/ticket/ticketSale.spec.js @@ -152,22 +152,6 @@ describe('TicketSale', () => { cy.checkNotification('Future ticket date not allowed'); }); - it('marks row as reserved', () => { - selectFirstRow(); - cy.dataCy('ticketSaleMoreActionsDropdown').click(); - cy.waitForElement('[data-cy="markAsReservedItem"]'); - cy.dataCy('markAsReservedItem').click(); - cy.dataCy('ticketSaleReservedIcon').should('exist'); - }); - - it('unmarks row as reserved', () => { - selectFirstRow(); - cy.dataCy('ticketSaleMoreActionsDropdown').click(); - cy.waitForElement('[data-cy="unmarkAsReservedItem"]'); - cy.dataCy('unmarkAsReservedItem').click(); - cy.dataCy('ticketSaleReservedIcon').should('not.exist'); - }); - it('refunds row with warehouse', () => { selectFirstRow(); cy.dataCy('ticketSaleMoreActionsDropdown').click(); -- 2.40.1 From 17b784e4d107711f329a84324be5706b406b0d11 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 24 Mar 2025 09:46:10 +0100 Subject: [PATCH 3/4] test: rename account descriptor test and enable claim notes test --- .../integration/account/accountDescriptorMenu.spec.js | 5 ++++- test/cypress/integration/claim/claimNotes.spec.js | 2 +- test/cypress/integration/ticket/ticketSale.spec.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cypress/integration/account/accountDescriptorMenu.spec.js b/test/cypress/integration/account/accountDescriptorMenu.spec.js index 67a7d8ef6..04fc57040 100644 --- a/test/cypress/integration/account/accountDescriptorMenu.spec.js +++ b/test/cypress/integration/account/accountDescriptorMenu.spec.js @@ -1,4 +1,4 @@ -describe('ClaimNotes', () => { +describe('Account descriptor', () => { const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list'; const url = '/#/account/1/summary'; @@ -7,6 +7,9 @@ describe('ClaimNotes', () => { cy.visit(url); cy.dataCy('descriptor-more-opts').click(); cy.get(descriptorOptions) + .should('exist') + .should('be.visible') + .find('.q-item') .its('length') .then((count) => { diff --git a/test/cypress/integration/claim/claimNotes.spec.js b/test/cypress/integration/claim/claimNotes.spec.js index ae8b4186c..fa4a214a1 100644 --- a/test/cypress/integration/claim/claimNotes.spec.js +++ b/test/cypress/integration/claim/claimNotes.spec.js @@ -1,4 +1,4 @@ -describe.skip('ClaimNotes', () => { +describe('ClaimNotes', () => { const saveBtn = '.q-field__append > .q-btn > .q-btn__content > .q-icon'; const firstNote = '.q-infinite-scroll :nth-child(1) > .q-card__section--vert'; beforeEach(() => { diff --git a/test/cypress/integration/ticket/ticketSale.spec.js b/test/cypress/integration/ticket/ticketSale.spec.js index 514c50281..6d84f214c 100644 --- a/test/cypress/integration/ticket/ticketSale.spec.js +++ b/test/cypress/integration/ticket/ticketSale.spec.js @@ -23,7 +23,7 @@ describe('TicketSale', () => { cy.get('[data-col-field="price"]') .find('.q-btn > .q-btn__content') - .should('have.text', `€${price}`); + .should('contain.text', `€${price}`); }); it('update discount', () => { const discount = Math.floor(Math.random() * 100) + 1; -- 2.40.1 From 67e0791f3480ff279d82c76fa8553bda73cec391 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 27 Mar 2025 09:03:40 +0100 Subject: [PATCH 4/4] fix: update order list tests to remove only and skip modifiers --- test/cypress/integration/order/orderList.spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/cypress/integration/order/orderList.spec.js b/test/cypress/integration/order/orderList.spec.js index 0f04d256b..ee011ea05 100644 --- a/test/cypress/integration/order/orderList.spec.js +++ b/test/cypress/integration/order/orderList.spec.js @@ -10,7 +10,7 @@ describe('OrderList', () => { cy.visit('/#/order/list'); }); - it.only('create order', () => { + it('create order', () => { cy.get('[data-cy="vnTableCreateBtn"]').click(); cy.selectOption(clientCreateSelect, 1101); cy.get(addressCreateSelect).click(); @@ -30,9 +30,11 @@ describe('OrderList', () => { cy.url().should('include', `/order`); }); - it.skip('filter list and create order', () => { + it('filter list and create order', () => { cy.dataCy('Customer ID_input').type('1101{enter}'); + cy.intercept('GET', /\/api\/Clients/).as('clientFilter'); cy.dataCy('vnTableCreateBtn').click(); + cy.wait('@clientFilter'); cy.dataCy('landedDate').find('input').type('06/01/2001'); cy.selectOption(agencyCreateSelect, 1); -- 2.40.1