2018-11-16 11:03:52 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
2020-01-23 15:01:29 +00:00
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
2018-11-16 11:03:52 +00:00
|
|
|
|
2020-05-06 16:42:50 +00:00
|
|
|
// #2221 Local MySQL8 crashes when rest method Items/getBalance is called
|
2020-04-09 14:50:41 +00:00
|
|
|
xdescribe('Ticket diary path', () => {
|
2020-01-23 15:01:29 +00:00
|
|
|
let page;
|
2018-11-16 11:03:52 +00:00
|
|
|
|
2020-01-23 15:01:29 +00:00
|
|
|
beforeAll(async() => {
|
2020-03-25 19:44:59 +00:00
|
|
|
page = (await getBrowser()).page;
|
2020-01-23 15:01:29 +00:00
|
|
|
await page.loginAndModule('employee', 'ticket');
|
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(async() => {
|
2020-03-25 19:44:59 +00:00
|
|
|
await page.browser().close();
|
2018-11-16 11:03:52 +00:00
|
|
|
});
|
|
|
|
|
2020-03-25 19:44:59 +00:00
|
|
|
it(`should navigate to item diary from ticket sale and check the lines`, async() => {
|
|
|
|
await page.accessToSearchResult('1');
|
2020-01-23 15:01:29 +00:00
|
|
|
await page.waitToClick(selectors.ticketSummary.firstSaleItemId);
|
|
|
|
await page.waitToClick(selectors.ticketSummary.popoverDiaryButton);
|
2020-03-25 19:44:59 +00:00
|
|
|
await page.waitForState('item.card.diary');
|
2018-11-16 11:03:52 +00:00
|
|
|
|
2020-03-25 19:44:59 +00:00
|
|
|
const secondIdClass = await page.getClassName(selectors.itemDiary.secondTicketId);
|
|
|
|
const fourthBalanceClass = await page.getClassName(selectors.itemDiary.fourthBalance);
|
|
|
|
const firstBalanceClass = await page.getClassName(selectors.itemDiary.firstBalance);
|
2018-11-16 11:03:52 +00:00
|
|
|
|
2020-03-25 19:44:59 +00:00
|
|
|
expect(secondIdClass).toContain('message');
|
|
|
|
expect(fourthBalanceClass).toContain('message');
|
|
|
|
expect(firstBalanceClass).toContain('balance');
|
2018-11-16 11:03:52 +00:00
|
|
|
});
|
|
|
|
});
|