2023-04-20 06:24:43 +00:00
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
|
2023-04-21 07:47:34 +00:00
|
|
|
describe('InvoiceOut negative bases path', () => {
|
2023-04-20 06:24:43 +00:00
|
|
|
let browser;
|
|
|
|
let page;
|
|
|
|
const httpRequests = [];
|
|
|
|
|
|
|
|
beforeAll(async() => {
|
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
|
|
|
page.on('request', req => {
|
2023-04-21 07:47:34 +00:00
|
|
|
if (req.url().includes(`InvoiceOuts/negativeBases`))
|
2023-04-20 06:24:43 +00:00
|
|
|
httpRequests.push(req.url());
|
|
|
|
});
|
2023-04-21 07:47:34 +00:00
|
|
|
await page.loginAndModule('administrative', 'invoiceOut');
|
|
|
|
await page.accessToSection('invoiceOut.negative-bases');
|
2023-04-20 06:24:43 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
});
|