salix/e2e/paths/05-ticket-module/08_components.spec.js

32 lines
957 B
JavaScript
Raw Normal View History

2018-10-25 14:44:03 +00:00
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
2018-10-25 14:44:03 +00:00
describe('Ticket List components path', () => {
let browser;
let page;
2018-10-25 14:44:03 +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;
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);
});
});