feat: add e2e
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
2da34d0850
commit
5824fee213
|
@ -0,0 +1,50 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
fdescribe('Ticket expeditions', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('production', 'ticket');
|
||||
await page.accessToSearchResult('1');
|
||||
await page.accessToSection('ticket.card.expedition');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it(`should move one expedition to new ticket withoute route`, async() => {
|
||||
await page.waitToClick(selectors.ticketExpedition.thirdSaleCheckbox);
|
||||
await page.waitToClick(selectors.ticketExpedition.moveExpeditionButton);
|
||||
await page.waitToClick(selectors.ticketExpedition.moreMenuWithoutRoute);
|
||||
await page.waitToClick(selectors.ticketExpedition.saveButton);
|
||||
await page.waitForState('ticket.card.summary');
|
||||
await page.accessToSection('ticket.card.expedition');
|
||||
|
||||
await page.waitForSelector(selectors.ticketExpedition.expeditionRow, {});
|
||||
const result = await page
|
||||
.countElement(selectors.ticketExpedition.expeditionRow);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
|
||||
it(`should move one expedition to new ticket with route`, async() => {
|
||||
await page.waitToClick(selectors.ticketExpedition.firstSaleCheckbox);
|
||||
await page.waitToClick(selectors.ticketExpedition.moveExpeditionButton);
|
||||
await page.waitToClick(selectors.ticketExpedition.moreMenuWithRoute);
|
||||
await page.write(selectors.ticketExpedition.newRouteId, '1');
|
||||
await page.waitToClick(selectors.ticketExpedition.saveButton);
|
||||
await page.waitForState('ticket.card.summary');
|
||||
await page.accessToSection('ticket.card.expedition');
|
||||
|
||||
await page.waitForSelector(selectors.ticketExpedition.expeditionRow, {});
|
||||
const result = await page
|
||||
.countElement(selectors.ticketExpedition.expeditionRow);
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue