refs #5252 fix: te2e
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-05-25 15:03:22 +02:00
parent 96feb24f12
commit 71d8a355bd
3 changed files with 16 additions and 1 deletions

View File

@ -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',

View File

@ -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);

View File

@ -530,6 +530,7 @@
Unmark as reserved
</vn-item>
<vn-item class="dropdown"
name="refund"
vn-click-stop="refundMenu.show($event, 'left')"
vn-acl="invoicing, claimManager, salesAssistant"
vn-acl-action="remove"
@ -538,11 +539,13 @@
<vn-menu vn-id="refundMenu">
<vn-list>
<vn-item
name="refundWithWarehouse"
ng-click="$ctrl.createRefund(true)"
translate>
with warehouse
</vn-item>
<vn-item
name="refundWithoutWarehouse"
ng-click="$ctrl.createRefund(false)"
translate>
without warehouse