salix/e2e/paths/05-ticket/11_diary.spec.js

32 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-11-16 11:03:52 +00:00
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
2018-11-16 11:03:52 +00:00
// #2221 Local MySQL8 crashes when rest method Items/getBalance is called
xdescribe('Ticket diary path', () => {
let page;
2018-11-16 11:03:52 +00:00
beforeAll(async() => {
2020-03-25 19:44:59 +00:00
page = (await getBrowser()).page;
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');
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
});
});