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

32 lines
1.0 KiB
JavaScript
Raw Normal View History

import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
2018-10-30 09:22:47 +00:00
2020-01-30 10:23:13 +00:00
describe('Client log path', () => {
let browser;
2019-12-31 11:00:16 +00:00
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
2019-12-31 11:00:16 +00:00
await page.loginAndModule('employee', 'client');
await page.accessToSearchResult('DavidCharlesHaller');
await page.accessToSection('client.card.basicData');
});
2018-10-30 09:22:47 +00:00
2019-12-31 11:00:16 +00:00
afterAll(async() => {
await browser.close();
2018-10-30 09:22:47 +00:00
});
2019-01-11 11:41:07 +00:00
it('should update the clients name', async() => {
2020-02-03 14:55:11 +00:00
await page.clearInput(selectors.clientBasicData.name);
await page.write(selectors.clientBasicData.name, 'this is a test');
2019-12-31 11:00:16 +00:00
await page.waitToClick(selectors.clientBasicData.saveButton);
2020-04-08 09:24:40 +00:00
const message = await page.waitForSnackbar();
2018-10-30 09:22:47 +00:00
2020-11-10 11:06:21 +00:00
expect(message.text).toContain('Data saved!');
2018-10-30 09:22:47 +00:00
});
2019-01-11 11:41:07 +00:00
it('should navigate to the log section', async() => {
2020-04-02 16:55:07 +00:00
await page.accessToSection('client.card.log');
2018-10-30 09:22:47 +00:00
});
});