From 3de82bc8f81cc45cafe3f9a78e7296b352c23375 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Thu, 6 Sep 2018 14:39:08 +0200 Subject: [PATCH] #604 e2e de la seccion ticket.sale selectors --- e2e/helpers/selectors.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 2a8e62233..13c623d2d 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -154,6 +154,7 @@ export default { firstInvoiceText: 'vn-client-invoice vn-card > div vn-table vn-tbody > vn-tr' }, itemsIndex: { + goBackToModuleIndexButton: `vn-ticket-descriptor a[href="#!/ticket/index"]`, createItemButton: `${components.vnFloatButton}`, searchResult: `vn-item-product a`, searchResultPreviewButton: `vn-item-product .buttons > [icon="desktop_windows"]`, @@ -302,16 +303,33 @@ export default { savePackagesButton: `${components.vnSubmit}` }, ticketSales: { + saleLine: `vn-table div > vn-tbody > vn-tr`, + saleDescriptorPopover: `vn-item-descriptor-popover vn-item-descriptor`, + saleDescriptorPopoverSummaryButton: 'vn-item-descriptor-popover a[href="#!/item/1/summary"]', saleButton: `vn-menu-item a[ui-sref="ticket.card.sale"]`, + descriptorItemDiaryButton: `vn-item-descriptor > vn-card > div > vn-horizontal.quicklinks.ng-scope > vn-horizontal > a > vn-icon > i`, firstSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(1)`, firstSaleThumbnailImage: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(3) > img', firstSaleZoomedImage: 'body > div > div > img', firstSaleQuantity: `vn-textfield[model="sale.quantity"]:nth-child(1) input`, - firstSaleID: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(4)', + firstSaleQuantityClearInput: `vn-textfield[model="sale.quantity"] div.suffix > i`, + firstSaleID: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(4) span', firstSalePrice: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(7)', + firstSalePriceInput: 'vn-ticket-sale:nth-child(1) > vn-vertical > vn-popover.edit.dialog-summary.ng-isolate-scope.vn-popover.shown > div > div.content > div > vn-textfield', firstSaleDiscount: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(8)', + firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input', firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)', - secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)` + secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)`, + firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] label`, + secondSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(2) vn-check[field="sale.checked"] label`, + thirdSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(3) vn-check[field="sale.checked"] label`, + deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]', + transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]', + moveToTicketInput: 'vn-ticket-sale vn-popover.transfer vn-textfield[model="$ctrl.moveToTicketFk"] input', + moveToTicketInputClearButton: 'vn-popover.shown i[title="Clear"]', + moveToTicketButton: 'vn-ticket-sale vn-popover.transfer vn-icon[icon="arrow_forward_ios"]', + moveToNewTicketButton: 'vn-ticket-sale vn-popover.transfer vn-button[label="New ticket"]', + acceptDeleteButton: `vn-ticket-sale > vn-confirm[vn-id="delete-lines"] button[response=ACCEPT]` }, ticketTracking: { trackingButton: `vn-menu-item a[ui-sref="ticket.card.tracking.index"]`,