salix/e2e/paths/09-invoice-in/05_unbilled_clients.spec.js

30 lines
851 B
JavaScript
Raw Normal View History

import getBrowser from '../../helpers/puppeteer';
2023-03-16 08:35:00 +00:00
describe('InvoiceIn unbilled clients path', () => {
let browser;
let page;
const httpRequests = [];
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
page.on('request', req => {
2023-03-16 08:35:00 +00:00
if (req.url().includes(`InvoiceIns/unbilledClients`))
httpRequests.push(req.url());
});
await page.loginAndModule('administrative', 'invoiceIn');
2023-03-16 08:35:00 +00:00
await page.accessToSection('invoiceIn.unbilled-clients');
});
afterAll(async() => {
await browser.close();
});
2023-03-16 08:35:00 +00:00
it('should show unbilled clients in a date range', async() => {
const request = httpRequests.find(req =>
req.includes(`from`) && req.includes(`to`));
expect(request).toBeDefined();
});
});