updated path for ticked restored
This commit is contained in:
parent
12b623f5ee
commit
6a66445f94
|
@ -389,6 +389,7 @@ export default {
|
|||
moreMenuDeleteStowawayButton: '.vn-menu [name="deleteStowaway"]',
|
||||
moreMenuAddToTurn: '.vn-menu [name="addTurn"]',
|
||||
moreMenuDeleteTicket: '.vn-menu [name="deleteTicket"]',
|
||||
moreMenuRestoreTicket: '.vn-menu [name="restoreTicket"]',
|
||||
moreMenuMakeInvoice: '.vn-menu [name="makeInvoice"]',
|
||||
moreMenuChangeShippedHour: '.vn-menu [name="changeShipped"]',
|
||||
changeShippedHourDialog: '.vn-dialog.shown',
|
||||
|
@ -397,7 +398,7 @@ export default {
|
|||
shipButton: 'vn-ticket-descriptor vn-icon[icon="icon-stowaway"]',
|
||||
thursdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(4)',
|
||||
saturdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(6)',
|
||||
acceptDeleteButton: '.vn-dialog.shown button[response="accept"]',
|
||||
acceptDialog: '.vn-dialog.shown button[response="accept"]',
|
||||
acceptChangeHourButton: '.vn-dialog.shown button[response="accept"]',
|
||||
descriptorDeliveryDate: 'vn-ticket-descriptor slot-body > .attributes > vn-label-value:nth-child(3) > section > span',
|
||||
acceptInvoiceOutButton: '.vn-confirm.shown button[response="accept"]',
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('Ticket descriptor path', () => {
|
|||
it('should delete the ticket using the descriptor more menu', async() => {
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
|
||||
await page.waitToClick(selectors.ticketDescriptor.acceptDeleteButton);
|
||||
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toBe('Ticket deleted. You can undo this action within the first hour');
|
||||
|
@ -51,16 +51,32 @@ describe('Ticket descriptor path', () => {
|
|||
await page.waitForState('ticket.index');
|
||||
});
|
||||
|
||||
it(`should search for the deleted ticket and check it's date`, async() => {
|
||||
it(`should search for the deleted ticket and check the deletedTicket icon and it's date`, async() => {
|
||||
await page.write(selectors.ticketsIndex.topbarSearch, '18');
|
||||
await page.waitToClick(selectors.globalItems.searchButton);
|
||||
await page.waitForState('ticket.card.summary');
|
||||
await page.waitForClassPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright');
|
||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');
|
||||
|
||||
expect(result).toContain(2000);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Restore ticket', () => {
|
||||
it('should restore the ticket using the descriptor more menu', async() => {
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuRestoreTicket);
|
||||
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toBe('Data saved!');
|
||||
});
|
||||
|
||||
it('should make sure the ticketDeleted icon is no longer bright', async() => {
|
||||
await page.waitForClassNotPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright');
|
||||
});
|
||||
});
|
||||
|
||||
describe('add stowaway', () => {
|
||||
it('should search for a ticket', async() => {
|
||||
await page.accessToSearchResult('16');
|
||||
|
|
|
@ -74,7 +74,7 @@ describe('Ticket create path', () => {
|
|||
it('should delete the current ticket', async() => {
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenu);
|
||||
await page.waitToClick(selectors.ticketDescriptor.moreMenuDeleteTicket);
|
||||
await page.waitToClick(selectors.ticketDescriptor.acceptDeleteButton);
|
||||
await page.waitToClick(selectors.ticketDescriptor.acceptDialog);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.type).toBe('success');
|
||||
|
|
Loading…
Reference in New Issue