#957 ticket.descriptor stowaway singlepage nav e2e

This commit is contained in:
Carlos Jimenez Ruiz 2019-03-20 12:23:38 +01:00
parent d38ca72fd8
commit 30333a914e
4 changed files with 10 additions and 12 deletions

View File

@ -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)`,

View File

@ -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() => {

View File

@ -70,7 +70,7 @@
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
@ -78,7 +78,7 @@
</a>
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
@ -86,7 +86,7 @@
</a>
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">

View File

@ -57,8 +57,7 @@ class Controller {
}
goToTicket(ticketID) {
let url = this.$state.href('ticket.card.sale', {id: ticketID}, {absolute: true});
window.open(url, '_blank');
this.$state.go('ticket.card.sale', {id: ticketID}, {absolute: true});
}
onMoreOpen() {