2018-10-25 14:44:03 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
2020-01-23 15:01:29 +00:00
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
2018-10-25 14:44:03 +00:00
|
|
|
|
|
|
|
describe('Ticket List components path', () => {
|
2020-01-23 15:01:29 +00:00
|
|
|
let browser;
|
|
|
|
let page;
|
2018-10-25 14:44:03 +00:00
|
|
|
|
2020-01-23 15:01:29 +00:00
|
|
|
beforeAll(async() => {
|
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
|
|
|
await page.loginAndModule('employee', 'ticket');
|
|
|
|
await page.accessToSearchResult('1');
|
|
|
|
await page.accessToSection('ticket.card.components');
|
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(async() => {
|
|
|
|
await browser.close();
|
2018-10-25 14:44:03 +00:00
|
|
|
});
|
|
|
|
|
2019-01-11 14:06:18 +00:00
|
|
|
it('should confirm the total base is correct', async() => {
|
2018-10-25 14:44:03 +00:00
|
|
|
const name = 'Base €';
|
|
|
|
const minLength = name.length;
|
|
|
|
|
2020-01-23 15:01:29 +00:00
|
|
|
await page.waitPropertyLength(selectors.ticketComponents.base, 'innerText', minLength);
|
|
|
|
const base = await page.waitToGetProperty(selectors.ticketComponents.base, 'innerText');
|
2018-10-25 14:44:03 +00:00
|
|
|
|
|
|
|
expect(base).toContain('Base');
|
|
|
|
expect(base.length).toBeGreaterThan(minLength);
|
|
|
|
});
|
|
|
|
});
|