This commit is contained in:
parent
11b99d9a5f
commit
6bc92b6ba7
|
@ -355,12 +355,16 @@ export default {
|
|||
moreMenuAddToTurn: 'vn-ticket-descriptor vn-drop-down > vn-popover ul > li[name="Add turn"]',
|
||||
moreMenuDeleteTicket: 'vn-ticket-descriptor vn-drop-down > vn-popover ul > li[name="Delete ticket"]',
|
||||
moreMenuMakeInvoice: 'vn-ticket-descriptor vn-drop-down > vn-popover ul > li[name="Make invoice"]',
|
||||
moreMenuChangeShippedHour: 'vn-ticket-descriptor vn-drop-down > vn-popover ul > li[name="Change shipped hour"]',
|
||||
changeShippedHourInput: 'vn-ticket-descriptor > vn-dialog.ng-isolate-scope.vn-dialog.shown vn-input-time input',
|
||||
addStowawayDialogFirstTicket: 'vn-ticket-descriptor > vn-add-stowaway > vn-dialog vn-table vn-tbody vn-tr',
|
||||
shipButton: 'vn-ticket-descriptor > div > div.body > div.quicklinks vn-icon[icon="icon-stowaway"]',
|
||||
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)',
|
||||
closeStowawayDialog: 'vn-ticket-descriptor > vn-add-stowaway > vn-dialog > div > button[class="close"]',
|
||||
acceptDeleteButton: 'vn-ticket-descriptor button[response="ACCEPT"]',
|
||||
acceptChangeHourButton: 'vn-ticket-descriptor vn-dialog[vn-id="changeShippedDialog"] button[response="ACCEPT"]',
|
||||
descriptorDeliveryDate: 'vn-ticket-descriptor > div > div.body > div.attributes > vn-label-value:nth-child(6) > section > span',
|
||||
acceptInvoiceOutButton: 'vn-ticket-descriptor vn-confirm[vn-id="makeInvoiceConfirmation"] button[response="ACCEPT"]',
|
||||
acceptDeleteStowawayButton: 'vn-ticket-descriptor > vn-remove-stowaway button[response="ACCEPT"]'
|
||||
},
|
||||
|
|
|
@ -30,6 +30,33 @@ describe('Ticket descriptor path', () => {
|
|||
expect(url.hash).toContain('/summary');
|
||||
});
|
||||
|
||||
it('should open the change shipped hours dialog by using the more menu option', async() => {
|
||||
const visible = await nightmare
|
||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||
.waitToClick(selectors.ticketDescriptor.moreMenuChangeShippedHour)
|
||||
.wait(selectors.ticketDescriptor.changeShippedHourInput)
|
||||
.isVisible(selectors.ticketDescriptor.changeShippedHourInput);
|
||||
|
||||
|
||||
expect(visible).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should update the shipped hour`, async() => {
|
||||
const result = await nightmare
|
||||
.write(selectors.ticketDescriptor.changeShippedHourInput, '0815')
|
||||
.waitToClick(selectors.ticketDescriptor.acceptChangeHourButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Shipped hour updated');
|
||||
});
|
||||
|
||||
it(`should confirm the ticket descriptor shows the correct shipping hour`, async() => {
|
||||
const result = await nightmare
|
||||
.waitToGetProperty(selectors.ticketDescriptor.descriptorDeliveryDate, 'innerText');
|
||||
|
||||
expect(result).toContain('08:15');
|
||||
});
|
||||
|
||||
it('should delete the ticket using the descriptor more menu', async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||
|
|
|
@ -51,5 +51,6 @@
|
|||
"Invalid parameters to create a new ticket": "Invalid parameters to create a new ticket",
|
||||
"Concept cannot be blank": "Concept cannot be blank",
|
||||
"Ticket id cannot be blank": "Ticket id cannot be blank",
|
||||
"Weekday cannot be blank": "Weekday cannot be blank"
|
||||
"Weekday cannot be blank": "Weekday cannot be blank",
|
||||
"This ticket can not be modified": "This ticket can not be modified"
|
||||
}
|
Loading…
Reference in New Issue