From 527116f1ec57527e296cd45c9267c88015d4e922 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 26 May 2023 12:20:02 +0200 Subject: [PATCH] refs #5252 fix: te2e --- e2e/helpers/selectors.js | 1 + .../05-ticket/01-sale/02_edit_sale.spec.js | 21 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 821120a74..65d446790 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -596,6 +596,7 @@ export default { moreMenuRecalculatePrice: 'vn-item[name="calculatePrice"]', moreMenuRefund: 'vn-item[name="refund"]', refundWithWarehouse: 'vn-item[name="refundWithWarehouse"]', + refundWithoutWarehouse: 'vn-item[name="refundWithoutWarehouse"]', moreMenuUpdateDiscountInput: 'vn-input-number[ng-model="$ctrl.edit.discount"] input', transferQuantityInput: '.vn-popover.shown vn-table > div > vn-tbody > vn-tr > vn-td-editable > span > text', transferQuantityCell: '.vn-popover.shown vn-table > div > vn-tbody > vn-tr > vn-td-editable', diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index e5ba708cc..8699ee002 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -220,7 +220,7 @@ describe('Ticket Edit sale path', () => { it('should log in as salesAssistant and navigate to ticket sales', async() => { await page.loginAndModule('salesAssistant', 'ticket'); - await page.accessToSearchResult('16'); + await page.accessToSearchResult('17'); await page.accessToSection('ticket.card.sale'); }); @@ -233,15 +233,15 @@ describe('Ticket Edit sale path', () => { await page.waitForState('ticket.card.sale'); }); - // it('should select the first sale and create a refund without warehouse', async() => { - // await page.accessToSearchResult('15'); - // await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); - // await page.waitToClick(selectors.ticketSales.moreMenu); - // await page.waitToClick(selectors.ticketSales.moreMenuRefund); - // await page.waitToClick(selectors.ticketSales.refundWithoutWarehouse); - // await page.waitForSnackbar(); - // await page.waitForState('ticket.card.sale'); - // }); + it('should select the first sale and create a refund without warehouse', async() => { + await page.accessToSearchResult('18'); + await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); + await page.waitToClick(selectors.ticketSales.moreMenu); + await page.waitToClick(selectors.ticketSales.moreMenuRefund); + await page.waitToClick(selectors.ticketSales.refundWithoutWarehouse); + await page.waitForSnackbar(); + await page.waitForState('ticket.card.sale'); + }); it('should show error trying to delete a ticket with a refund', async() => { await page.accessToSearchResult('16'); @@ -257,7 +257,6 @@ describe('Ticket Edit sale path', () => { it('should select the third sale and create a claim of it', async() => { await page.accessToSearchResult('16'); await page.accessToSection('ticket.card.sale'); - await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox); await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim);