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

34 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-08-12 14:58:39 +00:00
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
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)
.waitForClassPresent(selectors.dms.firstDocWorkerDescriptor, 'shown')
.isVisible(selectors.dms.firstDocWorkerDescriptor);
expect(visible).toBeTruthy();
});
});
});