salix/e2e/paths/02-client/13_log.spec.js

32 lines
1.0 KiB
JavaScript

import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
describe('Client log path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'client');
await page.accessToSearchResult('DavidCharlesHaller');
await page.accessToSection('client.card.basicData');
});
afterAll(async() => {
await browser.close();
});
it('should update the clients name', async() => {
await page.clearInput(selectors.clientBasicData.name);
await page.write(selectors.clientBasicData.name, 'this is a test');
await page.waitToClick(selectors.clientBasicData.saveButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Data saved!');
});
it('should navigate to the log section', async() => {
await page.accessToSection('client.card.log');
});
});