From 30333a914e5532e163f5fce292f19450070c270e Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 20 Mar 2019 12:23:38 +0100 Subject: [PATCH] #957 ticket.descriptor stowaway singlepage nav e2e --- e2e/helpers/selectors.js | 3 ++- e2e/paths/ticket-module/12_descriptor.spec.js | 10 ++++------ modules/ticket/front/descriptor/index.html | 6 +++--- modules/ticket/front/descriptor/index.js | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3ff8bf837..a52a4f9c8 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -330,7 +330,8 @@ export default { moreMenuAddToTurn: `vn-ticket-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(2)`, moreMenuDeleteTicket: `vn-ticket-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(3)`, addStowawayDialogSecondTicket: 'vn-ticket-descriptor > vn-add-stowaway > vn-dialog vn-table vn-tr:nth-child(2)', - shipButton: 'vn-ticket-descriptor > div > div.body > div.quicklinks > vn-button-menu[icon="icon-stowaway"]', + shipSelectButton: 'vn-ticket-descriptor > div > div.body > div.quicklinks > vn-button-menu[icon="icon-stowaway"]', + shipButton: 'vn-ticket-descriptor > div > div.body > div.quicklinks vn-icon[icon="icon-stowaway"]', shipMenuSecondTicket: 'vn-ticket-descriptor div.quicklinks vn-drop-down li:nth-child(2)', thursdayButton: `vn-ticket-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-tool-bar > vn-button:nth-child(4)`, saturdayButton: `vn-ticket-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-tool-bar > vn-button:nth-child(6)`, diff --git a/e2e/paths/ticket-module/12_descriptor.spec.js b/e2e/paths/ticket-module/12_descriptor.spec.js index 694ddacf7..1ef3ea303 100644 --- a/e2e/paths/ticket-module/12_descriptor.spec.js +++ b/e2e/paths/ticket-module/12_descriptor.spec.js @@ -1,8 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -// #957 e2e ticket.descriptor add stowaway new tabs breaking e2e -xdescribe('Ticket descriptor path', () => { +describe('Ticket descriptor path', () => { const nightmare = createNightmare(); beforeAll(() => { @@ -104,13 +103,12 @@ xdescribe('Ticket descriptor path', () => { it(`should navigate to the added ticket using the descriptors ship button`, async() => { const url = await nightmare .waitToClick(selectors.ticketDescriptor.closeStowawayDialog) - .waitToClick(selectors.ticketDescriptor.shipButton) + .waitToClick(selectors.ticketDescriptor.shipSelectButton) .waitToClick(selectors.ticketDescriptor.shipMenuSecondTicket) - // .end() - .waitForURL('#!/ticket/22/summary') + .waitForURL('#!/ticket/22/sale') .parsedUrl(); - expect(url.hash).toContain('#!/ticket/22/summary'); + expect(url.hash).toContain('#!/ticket/22/sale'); }); it(`should navigate to the ship ticket using the descriptors ship button`, async() => { diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index 948a5e63c..efc54d385 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -70,7 +70,7 @@