2018-03-02 13:45:22 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
2018-10-24 08:57:14 +00:00
|
|
|
import createNightmare from '../../helpers/nightmare';
|
2018-03-02 13:45:22 +00:00
|
|
|
|
2018-09-05 06:24:15 +00:00
|
|
|
describe('Client lock verified data path', () => {
|
|
|
|
const nightmare = createNightmare();
|
|
|
|
|
|
|
|
describe('as salesPerson', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:22:00 +00:00
|
|
|
nightmare
|
2018-12-02 23:45:34 +00:00
|
|
|
.loginAndModule('salesPerson', 'client')
|
|
|
|
.accessToSearchResult('Petter Parker')
|
|
|
|
.accessToSection('client.card.fiscalData');
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm verified data button is disabled for salesPerson', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2018-12-14 10:39:41 +00:00
|
|
|
.wait(200)
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2019-02-14 19:17:22 +00:00
|
|
|
return document.querySelector(selector).getAttribute('disabled');
|
2018-10-29 11:35:25 +00:00
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
|
|
|
|
expect(result).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should edit the social name', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.wait(selectors.clientFiscalData.socialNameInput)
|
|
|
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm the social name have been edited', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-01-27 20:09:54 +00:00
|
|
|
.reloadSection('client.card.fiscalData')
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
2018-10-29 11:35:25 +00:00
|
|
|
|
|
|
|
expect(result).toEqual('salesPerson was here');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('as administrative', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:22:00 +00:00
|
|
|
nightmare
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLogin('administrative');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should navigate to clients index', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
|
|
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
|
|
|
.waitToClick(selectors.globalItems.clientsButton)
|
|
|
|
.wait(selectors.clientsIndex.createClientButton)
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toEqual('#!/client/index');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should search again for the user Petter Parker', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const resultCount = await nightmare
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientsIndex.searchButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
|
|
|
.countElement(selectors.clientsIndex.searchResult);
|
|
|
|
|
|
|
|
expect(resultCount).toEqual(1);
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the search result to access to the Petter Parkers fiscal data`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
|
|
|
.waitToClick(selectors.clientsIndex.searchResult)
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the fiscal data button`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm verified data button is enabled for administrative', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2018-10-29 11:35:25 +00:00
|
|
|
return document.querySelector(selector).disabled;
|
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBeFalsy();
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should check the Verified data checkbox', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm Verified data checkbox is checked', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-01-27 20:09:54 +00:00
|
|
|
.reloadSection('client.card.fiscalData')
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox);
|
2018-10-29 11:35:25 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should again edit the social name', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.wait(selectors.clientFiscalData.socialNameInput)
|
|
|
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.socialNameInput, 'administrative was here')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should again confirm the social name have been edited', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-01-27 20:09:54 +00:00
|
|
|
.reloadSection('client.card.fiscalData')
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
2018-10-29 11:35:25 +00:00
|
|
|
|
|
|
|
expect(result).toEqual('administrative was here');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('as salesPerson second run', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:22:00 +00:00
|
|
|
nightmare
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLogin('salesPerson');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should again click on the Clients button of the top bar menu', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
|
|
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
|
|
|
.waitToClick(selectors.globalItems.clientsButton)
|
|
|
|
.wait(selectors.clientsIndex.createClientButton)
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toEqual('#!/client/index');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should again search for the user Petter Parker', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const resultCount = await nightmare
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientsIndex.searchButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
|
|
|
.countElement(selectors.clientsIndex.searchResult);
|
|
|
|
|
|
|
|
expect(resultCount).toEqual(1);
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the search result to access to the client's fiscal data`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
|
|
|
.waitToClick(selectors.clientsIndex.searchResult)
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the fiscal data button to start editing`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm verified data button is disabled once again for salesPerson', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2019-02-14 19:17:22 +00:00
|
|
|
return document.querySelector(selector).getAttribute('disabled');
|
2018-10-29 11:35:25 +00:00
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBeTruthy();
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should not be able to save change throwing a verified data error', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual(jasmine.arrayContaining([`You can't make changes on a client with verified data`]));
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('as salesAssistant', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:22:00 +00:00
|
|
|
nightmare
|
2019-01-30 10:09:53 +00:00
|
|
|
.forceReloadSection('client.card.fiscalData')
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLogin('salesAssistant');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should now navigate to clients index', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
|
|
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
|
|
|
.waitToClick(selectors.globalItems.clientsButton)
|
|
|
|
.wait(selectors.clientsIndex.createClientButton)
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toEqual('#!/client/index');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should now search again for the user Petter Parker', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const resultCount = await nightmare
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientsIndex.searchButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
|
|
|
.countElement(selectors.clientsIndex.searchResult);
|
|
|
|
|
|
|
|
expect(resultCount).toEqual(1);
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the search result to access to the Petter Parkers fiscal data`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
|
|
|
.waitToClick(selectors.clientsIndex.searchResult)
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the fiscal data button`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm verified data button is enabled for salesAssistant', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2019-02-14 19:17:22 +00:00
|
|
|
return document.querySelector(selector).getAttribute('disabled');
|
2018-10-29 11:35:25 +00:00
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
|
2018-11-27 14:02:54 +00:00
|
|
|
expect(result).toBeFalsy();
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should now edit the social name', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should now confirm the social name have been edited once and for all', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-01-27 20:09:54 +00:00
|
|
|
.reloadSection('client.card.fiscalData')
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
2018-10-29 11:35:25 +00:00
|
|
|
|
|
|
|
expect(result).toEqual('salesAssistant was here');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('as salesPerson third run', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:22:00 +00:00
|
|
|
nightmare
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForLogin('salesPerson');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should now click on the Clients button of the top bar menu', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
|
|
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
|
|
|
.waitToClick(selectors.globalItems.clientsButton)
|
|
|
|
.wait(selectors.clientsIndex.createClientButton)
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toEqual('#!/client/index');
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should once again search for the user Petter Parker', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const resultCount = await nightmare
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientsIndex.searchButton)
|
2018-10-29 11:35:25 +00:00
|
|
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
|
|
|
.countElement(selectors.clientsIndex.searchResult);
|
|
|
|
|
|
|
|
expect(resultCount).toEqual(1);
|
2018-09-05 06:24:15 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the search result to access to the client's fiscal data`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
|
|
|
.waitToClick(selectors.clientsIndex.searchResult)
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it(`should click on the fiscal data button to start editing`, async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
|
|
|
.parsedUrl();
|
|
|
|
|
|
|
|
expect(url.hash).toContain('fiscal-data');
|
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm verified data button is enabled once again', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2019-02-14 19:17:22 +00:00
|
|
|
return document.querySelector(selector).getAttribute('disabled');
|
2018-10-29 11:35:25 +00:00
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBeTruthy();
|
2018-10-29 11:35:25 +00:00
|
|
|
});
|
|
|
|
|
2019-01-16 14:02:50 +00:00
|
|
|
it('should confirm the form is enabled for salesPerson', async() => {
|
2018-10-29 11:35:25 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.wait(selectors.clientFiscalData.socialNameInput)
|
2018-11-06 13:27:16 +00:00
|
|
|
.evaluate(selector => {
|
2018-10-29 11:35:25 +00:00
|
|
|
return document.querySelector(selector).disabled;
|
|
|
|
}, 'vn-textfield[field="$ctrl.client.socialName"] > div');
|
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBeFalsy();
|
2018-03-12 10:10:05 +00:00
|
|
|
});
|
|
|
|
});
|
2018-03-02 13:45:22 +00:00
|
|
|
});
|