30 lines
843 B
JavaScript
30 lines
843 B
JavaScript
|
import getBrowser from '../../helpers/puppeteer';
|
||
|
|
||
|
describe('InvoiceIn negative bases path', () => {
|
||
|
let browser;
|
||
|
let page;
|
||
|
const httpRequests = [];
|
||
|
|
||
|
beforeAll(async() => {
|
||
|
browser = await getBrowser();
|
||
|
page = browser.page;
|
||
|
page.on('request', req => {
|
||
|
if (req.url().includes(`InvoiceIns/negativeBases`))
|
||
|
httpRequests.push(req.url());
|
||
|
});
|
||
|
await page.loginAndModule('administrative', 'invoiceIn');
|
||
|
await page.accessToSection('invoiceIn.negative-bases');
|
||
|
});
|
||
|
|
||
|
afterAll(async() => {
|
||
|
await browser.close();
|
||
|
});
|
||
|
|
||
|
it('should show negative bases in a date range', async() => {
|
||
|
const request = httpRequests.find(req =>
|
||
|
req.includes(`from`) && req.includes(`to`));
|
||
|
|
||
|
expect(request).toBeDefined();
|
||
|
});
|
||
|
});
|