From 71d8a355bd126428d85274d8aab799f903f13092 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 25 May 2023 15:03:22 +0200 Subject: [PATCH] refs #5252 fix: te2e --- e2e/helpers/selectors.js | 1 + e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js | 13 ++++++++++++- modules/ticket/front/sale/index.html | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 086909ebf..821120a74 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -595,6 +595,7 @@ export default { moreMenuUpdateDiscount: 'vn-item[name="discount"]', moreMenuRecalculatePrice: 'vn-item[name="calculatePrice"]', moreMenuRefund: 'vn-item[name="refund"]', + refundWithWarehouse: 'vn-item[name="refundWithWarehouse"]', 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 2158eec8b..e5ba708cc 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 @@ -224,14 +224,25 @@ describe('Ticket Edit sale path', () => { await page.accessToSection('ticket.card.sale'); }); - it('should select the third sale and create a refund', async() => { + it('should select the first sale and create a refund with warehouse', async() => { await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuRefund); + await page.waitToClick(selectors.ticketSales.refundWithWarehouse); 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('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 show error trying to delete a ticket with a refund', async() => { await page.accessToSearchResult('16'); await page.waitToClick(selectors.ticketDescriptor.moreMenu); diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 689e34c63..0ed62641b 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -530,6 +530,7 @@ Unmark as reserved with warehouse without warehouse