#772 Ticket expeditions ha dejado de funcionar e2e
This commit is contained in:
parent
53fe9b6103
commit
545c6ef307
|
@ -10,56 +10,47 @@ describe('Ticket', () => {
|
||||||
.waitForLogin('production');
|
.waitForLogin('production');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the tickets index by clicking the tickets button', (done) => {
|
it('should access to the tickets index by clicking the tickets button', async () => {
|
||||||
return nightmare
|
const url = await nightmare
|
||||||
.click(selectors.moduleAccessView.ticketsSectionButton)
|
.click(selectors.moduleAccessView.ticketsSectionButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl();
|
||||||
.then((url) => {
|
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket with id 1', (done) => {
|
it('should search for the ticket with id 1', async () => {
|
||||||
return nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult);
|
||||||
.then((result) => {
|
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket expeditions`, (done) => {
|
it(`should click on the search result to access to the ticket expeditions`, async () => {
|
||||||
return nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketExpedition.expeditionButton)
|
.waitToClick(selectors.ticketExpedition.expeditionButton)
|
||||||
.waitForURL('expedition')
|
.waitForURL('expedition')
|
||||||
.url()
|
.url();
|
||||||
.then((url) => {
|
|
||||||
expect(url).toContain('expedition');
|
expect(url).toContain('expedition');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should delete a former expedition and confirm the remaining expedition is the expected one`, (done) => {
|
it(`should delete a former expedition and confirm the remaining expedition are the expected one`, async () => {
|
||||||
return nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.wait(selectors.ticketPackages.firstPackageSelect)
|
.wait(selectors.ticketPackages.firstPackageSelect)
|
||||||
.click(selectors.ticketExpedition.expeditionButton)
|
.click(selectors.ticketExpedition.expeditionButton)
|
||||||
.wait(selectors.ticketExpedition.secondExpeditionText)
|
.wait(selectors.ticketExpedition.expeditionRow)
|
||||||
.getInnerText(selectors.ticketExpedition.secondExpeditionText)
|
.countElement(selectors.ticketExpedition.expeditionRow);
|
||||||
.then((value) => {
|
|
||||||
expect(value).toContain('Iron Patriot');
|
expect(result).toEqual(3);
|
||||||
expect(value).toContain('root');
|
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue