35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import selectors from '../../helpers/selectors.js';
|
|
import openPage from '../../helpers/puppeteer';
|
|
|
|
describe('Client DMS', () => {
|
|
let page;
|
|
beforeAll(async() => {
|
|
page = await openPage();
|
|
await page.loginAndModule('salesPerson', 'client');
|
|
await page.accessToSearchResult('Tony Stark');
|
|
await page.accessToSection('client.card.dms.index');
|
|
});
|
|
|
|
afterAll(async() => {
|
|
page.close();
|
|
});
|
|
|
|
describe('as salesPerson', () => {
|
|
it('should delete de first file', async() => {
|
|
await page.waitToClick(selectors.dms.deleteFileButton);
|
|
await page.waitToClick(selectors.dms.acceptDeleteButton);
|
|
let result = await page.waitForLastSnackbar();
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
});
|
|
|
|
it(`should click on the first document line worker name making the descriptor visible`, async() => {
|
|
await page.waitToClick(selectors.dms.firstDocWorker);
|
|
await page.wait(selectors.dms.firstDocWorkerDescriptor);
|
|
const visible = await page.isVisible(selectors.dms.firstDocWorkerDescriptor);
|
|
|
|
expect(visible).toBeTruthy();
|
|
});
|
|
});
|
|
});
|