This commit is contained in:
parent
bd76840cb3
commit
2b4598049c
|
@ -306,6 +306,9 @@ export default {
|
|||
total: 'vn-ticket-summary vn-one.taxes > p:nth-child(3) > strong',
|
||||
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',
|
||||
firstSaleItemId: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > span',
|
||||
firstSaleDescriptorImage: 'vn-ticket-summary vn-item-descriptor-popover > vn-popover vn-item-descriptor img',
|
||||
itemDescriptorPopover: 'vn-ticket-summary vn-item-descriptor-popover > vn-popover',
|
||||
itemDescriptorPopoverItemDiaryButton: 'vn-ticket-summary > vn-item-descriptor-popover a[href="#!/item/2/diary?warehouseFk=5&ticketFk=20"]',
|
||||
popoverDiaryButton: 'vn-ticket-summary vn-item-descriptor-popover vn-item-descriptor vn-icon[icon="icon-transaction"]',
|
||||
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)',
|
||||
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)',
|
||||
|
|
|
@ -53,6 +53,22 @@ describe('Ticket Summary path', () => {
|
|||
expect(result).toContain('000002');
|
||||
});
|
||||
|
||||
it(`should click on the first sale ID making the item descriptor visible`, async() => {
|
||||
const visible = await nightmare
|
||||
.waitToClick(selectors.ticketSummary.firstSaleItemId)
|
||||
.waitImgLoad(selectors.ticketSummary.firstSaleDescriptorImage)
|
||||
.isVisible(selectors.ticketSummary.itemDescriptorPopover);
|
||||
|
||||
expect(visible).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should check the url for the item diary link of the descriptor is for the right item id`, async() => {
|
||||
const exists = await nightmare
|
||||
.exists(selectors.ticketSummary.itemDescriptorPopoverItemDiaryButton);
|
||||
|
||||
expect(exists).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should click on the SET OK button and throw a privileges error', async() => {
|
||||
let result = await nightmare
|
||||
.waitToClick(selectors.ticketSummary.setOk)
|
||||
|
|
Loading…
Reference in New Issue