import getBrowser from '../../helpers/puppeteer'; describe('InvoiceOut 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(`InvoiceOuts/negativeBases`)) httpRequests.push(req.url()); }); await page.loginAndModule('administrative', 'invoiceOut'); await page.accessToSection('invoiceOut.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(); }); });