32 lines
1021 B
JavaScript
32 lines
1021 B
JavaScript
import selectors from '../../helpers/selectors.js';
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
describe('create client path', () => {
|
|
let browser;
|
|
let page;
|
|
beforeAll(async() => {
|
|
browser = await getBrowser();
|
|
page = browser.page;
|
|
await page.loginAndModule('employee', 'client');
|
|
});
|
|
|
|
afterAll(async() => {
|
|
await browser.close();
|
|
});
|
|
|
|
it('should access to the create client view by clicking the create-client floating button', async() => {
|
|
await page.waitToClick(selectors.clientsIndex.createClientButton);
|
|
let url = await page.expectURL('#!/client/create');
|
|
|
|
expect(url).toBe(true);
|
|
});
|
|
|
|
it('should cancel the client creation to go back to clients index', async() => {
|
|
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
|
await page.waitToClick(selectors.globalItems.clientsButton);
|
|
let url = await page.expectURL('#!/client/index');
|
|
|
|
expect(url).toBe(true);
|
|
});
|
|
});
|