salix/e2e/paths/09-invoice-in/01_summary.spec.js

29 lines
813 B
JavaScript

import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('InvoiceIn summary path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('administrative', 'invoiceIn');
await page.accessToSearchResult('1');
});
afterAll(async() => {
await browser.close();
});
it('should reach the summary section', async() => {
await page.waitForState('invoiceIn.card.summary');
});
it('should contain some basic data from the invoice', async() => {
const result = await page.waitToGetProperty(selectors.invoiceInSummary.supplierRef, 'innerText');
expect(result).toEqual('1234');
});
});