salix/e2e/paths/02-client-module/17_dms.spec.js

34 lines
1.1 KiB
JavaScript

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