e2e refactor

This commit is contained in:
Carlos Jimenez 2018-11-20 14:22:00 +01:00
parent f90bad0719
commit 8f307b28b6
21 changed files with 837 additions and 887 deletions

View File

@ -1,125 +1,123 @@
import selectors from '../../helpers/selectors';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('create path', () => {
const nightmare = createNightmare();
describe('Client create path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('employee');
});
beforeAll(() => {
nightmare
.waitForLogin('employee');
});
it('should access to the clients index by clicking the clients button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.clientsSectionButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should access to the clients index by clicking the clients button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.clientsSectionButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
expect(url.hash).toEqual('#!/client/index');
});
expect(url.hash).toEqual('#!/client/index');
});
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
.countElement(selectors.clientsIndex.searchResult);
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
.countElement(selectors.clientsIndex.searchResult);
expect(result).toEqual(0);
});
expect(result).toEqual(0);
});
it('should access to the create client view by clicking the create-client floating button', async () => {
const url = await nightmare
.click(selectors.clientsIndex.createClientButton)
.wait(selectors.createClientView.createButton)
.parsedUrl();
it('should access to the create client view by clicking the create-client floating button', async () => {
const url = await nightmare
.click(selectors.clientsIndex.createClientButton)
.wait(selectors.createClientView.createButton)
.parsedUrl();
expect(url.hash).toEqual('#!/client/create');
});
expect(url.hash).toEqual('#!/client/create');
});
it('should return to the client index by clicking the cancel button', async () => {
const url = await nightmare
.click(selectors.createClientView.cancelButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should return to the client index by clicking the cancel button', async () => {
const url = await nightmare
.click(selectors.createClientView.cancelButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
expect(url.hash).toEqual('#!/client/index');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should now access to the create client view by clicking the create-client floating button', async () => {
const url = await nightmare
.click(selectors.clientsIndex.createClientButton)
.wait(selectors.createClientView.createButton)
.parsedUrl();
it('should now access to the create client view by clicking the create-client floating button', async () => {
const url = await nightmare
.click(selectors.clientsIndex.createClientButton)
.wait(selectors.createClientView.createButton)
.parsedUrl();
expect(url.hash).toEqual('#!/client/create');
});
expect(url.hash).toEqual('#!/client/create');
});
it('should receive an error when clicking the create button having all the form fields empty', async () => {
const result = await nightmare
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
it('should receive an error when clicking the create button having all the form fields empty', async () => {
const result = await nightmare
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Some fields are invalid');
});
expect(result).toEqual('Some fields are invalid');
});
it('should receive an error when clicking the create button having name and Business name fields empty', async () => {
const result = await nightmare
.type(selectors.createClientView.taxNumber, '74451390E')
.type(selectors.createClientView.userName, 'CaptainMarvel')
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
.waitToClick(selectors.createClientView.salesPersonInput)
.waitToClick(selectors.createClientView.salesBruceBannerOption)
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
it('should receive an error when clicking the create button having name and Business name fields empty', async () => {
const result = await nightmare
.type(selectors.createClientView.taxNumber, '74451390E')
.type(selectors.createClientView.userName, 'CaptainMarvel')
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
.waitToClick(selectors.createClientView.salesPersonInput)
.waitToClick(selectors.createClientView.salesBruceBannerOption)
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Some fields are invalid');
});
expect(result).toEqual('Some fields are invalid');
});
it(`should attempt to create a new user with all it's data but wrong email`, async () => {
const result = await nightmare
.type(selectors.createClientView.name, 'Carol Danvers')
.type(selectors.createClientView.socialName, 'AVG tax')
.clearInput(selectors.createClientView.email)
.type(selectors.createClientView.email, 'incorrect email format')
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
it(`should attempt to create a new user with all it's data but wrong email`, async () => {
const result = await nightmare
.type(selectors.createClientView.name, 'Carol Danvers')
.type(selectors.createClientView.socialName, 'AVG tax')
.clearInput(selectors.createClientView.email)
.type(selectors.createClientView.email, 'incorrect email format')
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Some fields are invalid');
});
expect(result).toEqual('Some fields are invalid');
});
it(`should create a new user with all correct data`, async () => {
const result = await nightmare
.clearInput(selectors.createClientView.email)
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
it(`should create a new user with all correct data`, async () => {
const result = await nightmare
.clearInput(selectors.createClientView.email)
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
.click(selectors.createClientView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it(`should search for the user Carol Danvers to confirm it exists`, async () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it(`should search for the user Carol Danvers to confirm it exists`, async () => {
const result = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(result).toEqual(1);
});
expect(result).toEqual(1);
});
});

View File

@ -5,7 +5,7 @@ describe('Client Edit basicData path', () => {
const nightmare = createNightmare();
describe('as employee', () => {
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('employee');
});
@ -121,7 +121,7 @@ describe('Client Edit basicData path', () => {
describe('as salesAssistanrt', () => {
beforeAll(() => {
return nightmare
nightmare
.waitToClick(selectors.globalItems.logOutButton)
.waitForLogin('salesAssistant');
});

View File

@ -1,138 +1,136 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('Add address path', () => {
const nightmare = createNightmare();
describe('Client Add address path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('employee');
});
beforeAll(() => {
nightmare
.waitForLogin('employee');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client addresses`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientAddresses.addressesButton)
.waitForURL('address/index')
.url();
it(`should click on the search result to access to the client addresses`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientAddresses.addressesButton)
.waitForURL('address/index')
.url();
expect(url).toContain('address/index');
});
expect(url).toContain('address/index');
});
it(`should click on the add new address button to access to the new address form`, async () => {
const url =await nightmare
.waitToClick(selectors.clientAddresses.createAddress)
.waitForURL('address/create')
.url();
it(`should click on the add new address button to access to the new address form`, async () => {
const url = await nightmare
.waitToClick(selectors.clientAddresses.createAddress)
.waitForURL('address/create')
.url();
expect(url).toContain('address/create');
});
expect(url).toContain('address/create');
});
it(`should return to the addreses section by clicking the cancel button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientAddresses.cancelButton)
.waitForURL('address/index')
.url();
it(`should return to the addreses section by clicking the cancel button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientAddresses.cancelButton)
.waitForURL('address/index')
.url();
expect(url).toContain('address/index');
});
expect(url).toContain('address/index');
});
it(`should now click on the add new address button to access to the new address form`, async () => {
const url = await nightmare
.waitToClick(selectors.clientAddresses.createAddress)
.waitForURL('address/create')
.url();
it(`should now click on the add new address button to access to the new address form`, async () => {
const url = await nightmare
.waitToClick(selectors.clientAddresses.createAddress)
.waitForURL('address/create')
.url();
expect(url).toContain('address/create');
});
expect(url).toContain('address/create');
});
it('should receive an error after clicking save button as consignee, street and town fields are empty', async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.defaultCheckboxInput)
.clearInput(selectors.clientAddresses.streetAddressInput)
.type(selectors.clientAddresses.postcodeInput, '10022')
.waitToClick(selectors.clientAddresses.provinceInput)
.waitToClick(selectors.clientAddresses.provinceSecondOption)
.waitToClick(selectors.clientAddresses.agencyInput)
.waitToClick(selectors.clientAddresses.agenctySecondOption)
.type(selectors.clientAddresses.phoneInput, '999887744')
.type(selectors.clientAddresses.mobileInput, '999887744')
.waitToClick(selectors.clientFiscalData.saveButton)
.waitForLastSnackbar();
it('should receive an error after clicking save button as consignee, street and town fields are empty', async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.defaultCheckboxInput)
.clearInput(selectors.clientAddresses.streetAddressInput)
.type(selectors.clientAddresses.postcodeInput, '10022')
.waitToClick(selectors.clientAddresses.provinceInput)
.waitToClick(selectors.clientAddresses.provinceSecondOption)
.waitToClick(selectors.clientAddresses.agencyInput)
.waitToClick(selectors.clientAddresses.agenctySecondOption)
.type(selectors.clientAddresses.phoneInput, '999887744')
.type(selectors.clientAddresses.mobileInput, '999887744')
.waitToClick(selectors.clientFiscalData.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Some fields are invalid');
});
expect(result).toEqual('Some fields are invalid');
});
it(`should create a new address with all it's data`, async () => {
const result = await nightmare
.type(selectors.clientAddresses.consigneeInput, 'Bruce Bunner')
.type(selectors.clientAddresses.streetAddressInput, '320 Park Avenue New York')
.type(selectors.clientAddresses.cityInput, 'New York')
.click(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();
it(`should create a new address with all it's data`, async () => {
const result = await nightmare
.type(selectors.clientAddresses.consigneeInput, 'Bruce Bunner')
.type(selectors.clientAddresses.streetAddressInput, '320 Park Avenue New York')
.type(selectors.clientAddresses.cityInput, 'New York')
.click(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it(`should click on the addresses button confirm the new address exists and it's the default one`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.addressesButton)
.wait(selectors.clientAddresses.defaultAddress)
.getInnerText(selectors.clientAddresses.defaultAddress);
it(`should click on the addresses button confirm the new address exists and it's the default one`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.addressesButton)
.wait(selectors.clientAddresses.defaultAddress)
.getInnerText(selectors.clientAddresses.defaultAddress);
expect(result).toContain('320 Park Avenue New York');
});
expect(result).toContain('320 Park Avenue New York');
});
it(`should click on the make default icon of the second address then confirm it is the default one now`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.secondMakeDefaultStar)
.waitForTextInElement(selectors.clientAddresses.defaultAddress, 'Somewhere in Thailand')
.getInnerText(selectors.clientAddresses.defaultAddress);
it(`should click on the make default icon of the second address then confirm it is the default one now`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.secondMakeDefaultStar)
.waitForTextInElement(selectors.clientAddresses.defaultAddress, 'Somewhere in Thailand')
.getInnerText(selectors.clientAddresses.defaultAddress);
expect(result).toContain('Somewhere in Thailand');
});
expect(result).toContain('Somewhere in Thailand');
});
it(`should click on the edit icon of the default address`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientAddresses.defaultAddress, 'Somewhere in Thailand')
.waitToClick(selectors.clientAddresses.firstEditButton)
.waitForURL('/edit')
.url();
it(`should click on the edit icon of the default address`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientAddresses.defaultAddress, 'Somewhere in Thailand')
.waitToClick(selectors.clientAddresses.firstEditButton)
.waitForURL('/edit')
.url();
expect(url).toContain('/edit');
});
expect(url).toContain('/edit');
});
it(`should click on the active checkbox and receive an error to save it because it is the default address`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.activeCheckbox)
.waitToClick(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();
it(`should click on the active checkbox and receive an error to save it because it is the default address`, async () => {
const result = await nightmare
.waitToClick(selectors.clientAddresses.activeCheckbox)
.waitToClick(selectors.clientAddresses.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('The default consignee can not be unchecked');
});
expect(result).toEqual('The default consignee can not be unchecked');
});
});

View File

@ -5,7 +5,7 @@ describe('Client add address notes path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('employee');
});

View File

@ -1,79 +1,77 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('Edit web access path', () => {
const nightmare = createNightmare();
describe('Client Edit web access path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('employee');
});
beforeAll(() => {
nightmare
.waitForLogin('employee');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client's web access`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientWebAccess.webAccessButton)
.waitForURL('web-access')
.url();
it(`should click on the search result to access to the client's web access`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientWebAccess.webAccessButton)
.waitForURL('web-access')
.url();
expect(url).toContain('web-access');
});
expect(url).toContain('web-access');
});
it(`should uncheck the Enable web access checkbox and update the name`, async () => {
const result = await nightmare
.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox)
.clearInput(selectors.clientWebAccess.userNameInput)
.type(selectors.clientWebAccess.userNameInput, 'Hulk')
.waitToClick(selectors.clientWebAccess.saveButton)
.waitForLastSnackbar();
it(`should uncheck the Enable web access checkbox and update the name`, async () => {
const result = await nightmare
.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox)
.clearInput(selectors.clientWebAccess.userNameInput)
.type(selectors.clientWebAccess.userNameInput, 'Hulk')
.waitToClick(selectors.clientWebAccess.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it('should confirm web access is now unchecked', async () => {
const result = await nightmare
.waitToClick(selectors.clientBasicData.basicDataButton)
.wait(selectors.clientBasicData.nameInput)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientWebAccess.webAccessButton)
.wait(selectors.clientWebAccess.enableWebAccessCheckbox)
.evaluate((selector) => {
return document.querySelector(selector).checked;
}, selectors.clientWebAccess.enableWebAccessCheckbox);
it('should confirm web access is now unchecked', async () => {
const result = await nightmare
.waitToClick(selectors.clientBasicData.basicDataButton)
.wait(selectors.clientBasicData.nameInput)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientWebAccess.webAccessButton)
.wait(selectors.clientWebAccess.enableWebAccessCheckbox)
.evaluate(selector => {
return document.querySelector(selector).checked;
}, selectors.clientWebAccess.enableWebAccessCheckbox);
expect(result).toBeFalsy();
});
expect(result).toBeFalsy();
});
it('should confirm web access name have been updated', async () => {
const result = await nightmare
.getInputValue(selectors.clientWebAccess.userNameInput);
it('should confirm web access name have been updated', async () => {
const result = await nightmare
.getInputValue(selectors.clientWebAccess.userNameInput);
expect(result).toEqual('Hulk');
});
expect(result).toEqual('Hulk');
});
});

View File

@ -1,72 +1,70 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('Add notes path', () => {
const nightmare = createNightmare();
describe('Client Add notes path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('employee');
});
beforeAll(() => {
nightmare
.waitForLogin('employee');
});
it('should click on the Clients button of the top bar menu', async ()=> {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async ()=> {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Bruce Banner', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client's notes`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientNotes.notesButton)
.waitForURL('note/index')
.url();
it(`should click on the search result to access to the client's notes`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientNotes.notesButton)
.waitForURL('note/index')
.url();
expect(url).toContain('note/index');
});
expect(url).toContain('note/index');
});
it(`should click on the add note button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientNotes.addNoteFloatButton)
.waitForURL('/note/create')
.url();
it(`should click on the add note button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientNotes.addNoteFloatButton)
.waitForURL('/note/create')
.url();
expect(url).toContain('/note/create');
});
expect(url).toContain('/note/create');
});
it(`should create a note`, async () => {
const result = await nightmare
.type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
.click(selectors.clientNotes.saveButton)
.waitForLastSnackbar();
it(`should create a note`, async () => {
const result = await nightmare
.type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
.click(selectors.clientNotes.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it('should confirm the note was created', async () => {
const result = await nightmare
.wait(selectors.clientNotes.firstNoteText)
.getInnerText(selectors.clientNotes.firstNoteText);
it('should confirm the note was created', async () => {
const result = await nightmare
.wait(selectors.clientNotes.firstNoteText)
.getInnerText(selectors.clientNotes.firstNoteText);
expect(result).toEqual('Meeting with Black Widow 21st 9am');
});
expect(result).toEqual('Meeting with Black Widow 21st 9am');
});
});

View File

@ -1,74 +1,72 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('Add credit path', () => {
const nightmare = createNightmare();
describe('Client Add credit path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('salesAssistant');
});
beforeAll(() => {
nightmare
.waitForLogin('salesAssistant');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Hank Pym', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Hank Pym')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Hank Pym', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Hank Pym')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client's credit`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Hank Pym')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientCredit.creditButton)
.waitForURL('credit/index')
.url();
it(`should click on the search result to access to the client's credit`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Hank Pym')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientCredit.creditButton)
.waitForURL('credit/index')
.url();
expect(url).toContain('credit/index');
});
expect(url).toContain('credit/index');
});
it(`should click on the add credit button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientCredit.addCreditFloatButton)
.waitForURL('/credit/create')
.url();
it(`should click on the add credit button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientCredit.addCreditFloatButton)
.waitForURL('/credit/create')
.url();
expect(url).toContain('/credit/create');
});
expect(url).toContain('/credit/create');
});
it(`should edit the credit`, async () => {
const result = await nightmare
.clearInput(selectors.clientCredit.creditInput)
.type(selectors.clientCredit.creditInput, 999)
.click(selectors.clientCredit.saveButton)
.waitForLastSnackbar();
it(`should edit the credit`, async () => {
const result = await nightmare
.clearInput(selectors.clientCredit.creditInput)
.type(selectors.clientCredit.creditInput, 999)
.click(selectors.clientCredit.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it('should confirm the credit was updated', async () => {
const result = await nightmare
.wait(selectors.clientCredit.firstCreditText)
.getInnerText(selectors.clientCredit.firstCreditText);
it('should confirm the credit was updated', async () => {
const result = await nightmare
.wait(selectors.clientCredit.firstCreditText)
.getInnerText(selectors.clientCredit.firstCreditText);
expect(result).toContain(999);
expect(result).toContain('salesAssistant');
});
expect(result).toContain(999);
expect(result).toContain('salesAssistant');
});
});

View File

@ -1,86 +1,84 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('Add greuge path', () => {
const nightmare = createNightmare();
describe('Client Add greuge path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('salesAssistant');
});
beforeAll(() => {
nightmare
.waitForLogin('salesAssistant');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client's greuge`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientGreuge.greugeButton)
.waitForURL('greuge/index')
.url();
it(`should click on the search result to access to the client's greuge`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientGreuge.greugeButton)
.waitForURL('greuge/index')
.url();
expect(url).toContain('greuge/index');
});
expect(url).toContain('greuge/index');
});
it(`should click on the add greuge button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientGreuge.addGreugeFloatButton)
.waitForURL('greuge/create')
.url();
it(`should click on the add greuge button`, async () => {
const url = await nightmare
.waitToClick(selectors.clientGreuge.addGreugeFloatButton)
.waitForURL('greuge/create')
.url();
expect(url).toContain('greuge/create');
});
expect(url).toContain('greuge/create');
});
it(`should receive an error if all fields are empty but date and type on submit`, async () => {
const result = await nightmare
.waitToClick(selectors.clientGreuge.typeInput)
.waitToClick(selectors.clientGreuge.typeSecondOption)
.click(selectors.clientGreuge.saveButton)
.waitForLastSnackbar();
it(`should receive an error if all fields are empty but date and type on submit`, async () => {
const result = await nightmare
.waitToClick(selectors.clientGreuge.typeInput)
.waitToClick(selectors.clientGreuge.typeSecondOption)
.click(selectors.clientGreuge.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Some fields are invalid');
});
expect(result).toEqual('Some fields are invalid');
});
it(`should create a new greuge with all its data`, async () => {
const result = await nightmare
.type(selectors.clientGreuge.amountInput, 999)
.waitForTextInInput(selectors.clientGreuge.amountInput, '999')
.type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
.click(selectors.clientGreuge.saveButton)
.waitForLastSnackbar();
it(`should create a new greuge with all its data`, async () => {
const result = await nightmare
.type(selectors.clientGreuge.amountInput, 999)
.waitForTextInInput(selectors.clientGreuge.amountInput, '999')
.type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
.click(selectors.clientGreuge.saveButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it('should confirm the greuge was added to the list', async () => {
const result = await nightmare
.wait(selectors.clientGreuge.firstGreugeText)
.getInnerText(selectors.clientGreuge.firstGreugeText);
it('should confirm the greuge was added to the list', async () => {
const result = await nightmare
.wait(selectors.clientGreuge.firstGreugeText)
.getInnerText(selectors.clientGreuge.firstGreugeText);
expect(result).toContain(999);
expect(result).toContain('new armor for Batman!');
expect(result).toContain('Diff');
});
expect(result).toContain(999);
expect(result).toContain('new armor for Batman!');
expect(result).toContain('Diff');
});
});

View File

@ -1,57 +1,55 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Client', () => {
describe('mandate path', () => {
const nightmare = createNightmare();
describe('Client mandate path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('salesPerson');
});
beforeAll(() => {
nightmare
.waitForLogin('salesPerson');
});
it('should click on the Clients button of the top bar menu', async () => {
const url = await nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl();
it('should click on the Clients button of the top bar menu', async () => {
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');
});
expect(url.hash).toEqual('#!/client/index');
});
it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
it('should search for the user Petter Parker', async () => {
const resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the client's mandate`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientMandate.mandateButton)
.waitForURL('mandate')
.url();
it(`should click on the search result to access to the client's mandate`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientsIndex.othersButton)
.waitToClick(selectors.clientMandate.mandateButton)
.waitForURL('mandate')
.url();
expect(url).toContain('mandate');
});
expect(url).toContain('mandate');
});
it('should confirm the client has a mandate of the CORE type', async () => {
const result = await nightmare
.wait(selectors.clientMandate.firstMandateText)
.getInnerText(selectors.clientMandate.firstMandateText);
it('should confirm the client has a mandate of the CORE type', async () => {
const result = await nightmare
.wait(selectors.clientMandate.firstMandateText)
.getInnerText(selectors.clientMandate.firstMandateText);
expect(result).toContain('1');
expect(result).toContain('VNL');
expect(result).toContain('CORE');
});
expect(result).toContain('1');
expect(result).toContain('VNL');
expect(result).toContain('CORE');
});
});

View File

@ -6,7 +6,7 @@ describe('Client lock verified data path', () => {
describe('as salesPerson', () => {
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('salesPerson');
});
@ -87,7 +87,7 @@ describe('Client lock verified data path', () => {
describe('as administrative', () => {
beforeAll(() => {
return nightmare
nightmare
.waitToClick(selectors.globalItems.logOutButton)
.waitForLogin('administrative');
});
@ -191,7 +191,7 @@ describe('Client lock verified data path', () => {
describe('as salesPerson second run', () => {
beforeAll(() => {
return nightmare
nightmare
.waitToClick(selectors.globalItems.logOutButton)
.waitForLogin('salesPerson');
});
@ -262,7 +262,7 @@ describe('Client lock verified data path', () => {
describe('as salesAssistant', () => {
beforeAll(() => {
return nightmare
nightmare
.waitToClick(selectors.globalItems.logOutButton)
.waitForLogin('salesAssistant');
});
@ -344,7 +344,7 @@ describe('Client lock verified data path', () => {
describe('as salesPerson third run', () => {
beforeAll(() => {
return nightmare
nightmare
.waitToClick(selectors.globalItems.logOutButton)
.waitForLogin('salesPerson');
});

View File

@ -5,7 +5,7 @@ describe('Client log path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('employee');
});

View File

@ -5,7 +5,7 @@ describe('Client risk path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('administrative');
});

View File

@ -30,17 +30,16 @@ describe('Item summary path', () => {
});
it(`should click on the search result summary button to open the item summary popup`, async () => {
const result = await nightmare
const isVisibleBefore = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
.isVisible(selectors.itemSummary.basicData)
.then(result => {
expect(result).toBeFalsy();
return nightmare
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
.isVisible(selectors.itemSummary.basicData);
});
.isVisible(selectors.itemSummary.basicData);
expect(result).toBeTruthy();
const isVisibleAfter = await nightmare
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
.isVisible(selectors.itemSummary.basicData);
expect(isVisibleBefore).toBeFalsy();
expect(isVisibleAfter).toBeTruthy();
});
it(`should check the item summary preview shows fields from basic data`, async () => {
@ -104,17 +103,17 @@ describe('Item summary path', () => {
});
it(`should now click on the search result summary button to open the item summary popup`, async () => {
const result = await nightmare
const isVisibleBefore = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Mind')
.isVisible(selectors.itemSummary.basicData)
.then(result => {
expect(result).toBeFalsy();
return nightmare
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
.isVisible(selectors.itemSummary.basicData);
});
.isVisible(selectors.itemSummary.basicData);
expect(result).toBeTruthy();
const isVisibleAfter = await nightmare
.waitToClick(selectors.itemsIndex.searchResultPreviewButton)
.isVisible(selectors.itemSummary.basicData);
expect(isVisibleBefore).toBeFalsy();
expect(isVisibleAfter).toBeTruthy();
});
it(`should now check the item summary preview shows fields from basic data`, async () => {

View File

@ -1,130 +1,133 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Item', () => {
describe('Edit basic data path', () => {
const nightmare = createNightmare();
describe('Item Edit basic data path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('buyer');
});
beforeAll(() => {
nightmare
.waitForLogin('buyer');
});
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/index');
});
expect(url.hash).toEqual('#!/item/index');
});
it('should search for the item Gem of Mind', async () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Mind')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
it('should search for the item Gem of Mind', async () => {
const resultCount = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Mind')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
expect(resultCount).toEqual(1);
});
expect(resultCount).toEqual(1);
});
it(`should click on the search result to access to the item basic data`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Mind')
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemBasicData.basicDataButton)
.waitForURL('data')
.url();
it(`should click on the search result to access to the item basic data`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Mind')
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemBasicData.basicDataButton)
.waitForURL('data')
.url();
expect(url).toContain('data');
});
expect(url).toContain('data');
});
it(`should edit the item basic data`, async () => {
const result = await nightmare
.clearInput(selectors.itemBasicData.nameInput)
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
.waitToClick(selectors.itemBasicData.typeSelect)
.waitToClick(selectors.itemBasicData.typeSelectOptionThree)
.waitToClick(selectors.itemBasicData.intrastatSelect)
.waitToClick(selectors.itemBasicData.intrastatSelectOptionOne)
.clearInput(selectors.itemBasicData.relevancyInput)
.type(selectors.itemBasicData.relevancyInput, '1')
.waitToClick(selectors.itemBasicData.originSelect)
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
.waitToClick(selectors.itemBasicData.expenceSelect)
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
.clearInput(selectors.itemBasicData.longNameInput)
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
.click(selectors.itemBasicData.submitBasicDataButton)
.waitForLastSnackbar();
it(`should edit the item basic data`, async () => {
const result = await nightmare
.clearInput(selectors.itemBasicData.nameInput)
.type(selectors.itemBasicData.nameInput, 'Rose of Purity')
.waitToClick(selectors.itemBasicData.typeSelect)
.waitToClick(selectors.itemBasicData.typeSelectOptionThree)
.waitToClick(selectors.itemBasicData.intrastatSelect)
.waitToClick(selectors.itemBasicData.intrastatSelectOptionOne)
.clearInput(selectors.itemBasicData.relevancyInput)
.type(selectors.itemBasicData.relevancyInput, '1')
.waitToClick(selectors.itemBasicData.originSelect)
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
.waitToClick(selectors.itemBasicData.expenceSelect)
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
.clearInput(selectors.itemBasicData.longNameInput)
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
.waitToClick(selectors.itemBasicData.isActiveCheckbox)
.click(selectors.itemBasicData.submitBasicDataButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
expect(result).toEqual('Data saved!');
});
it(`should confirm the item name was edited`, async () => {
const result = await nightmare
.click(selectors.itemNiches.nicheButton)
.wait(selectors.itemNiches.firstWarehouseDisabled)
.waitToClick(selectors.itemBasicData.basicDataButton)
.waitForTextInInput(selectors.itemBasicData.nameInput, 'Rose of Purity')
.getInputValue(selectors.itemBasicData.nameInput);
it(`should confirm the item name was edited`, async () => {
const result = await nightmare
.click(selectors.itemNiches.nicheButton)
.wait(selectors.itemNiches.firstWarehouseDisabled)
.waitToClick(selectors.itemBasicData.basicDataButton)
.waitProperty(selectors.itemBasicData.nameInput, 'value')
.getProperty(selectors.itemBasicData.nameInput, 'value');
expect(result).toEqual('Rose of Purity');
});
expect(result).toEqual('Rose of Purity');
});
it(`should confirm the item type was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBasicData.typeSelect);
it(`should confirm the item type was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.typeSelect, 'value')
.getProperty(selectors.itemBasicData.typeSelect, 'value');
expect(result).toEqual('Crisantemo');
});
expect(result).toEqual('Crisantemo');
});
it(`should confirm the item intrastad was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.intrastatSelect, 'value')
.getProperty(selectors.itemBasicData.intrastatSelect, 'value');
it(`should confirm the item intrastad was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.intrastatSelect, 'value')
.getProperty(selectors.itemBasicData.intrastatSelect, 'value');
expect(result).toEqual('5080000 Coral y materiales similares');
});
expect(result).toEqual('5080000 Coral y materiales similares');
});
it(`should confirm the item relevancy was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBasicData.relevancyInput);
it(`should confirm the item relevancy was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.relevancyInput, 'value')
.getProperty(selectors.itemBasicData.relevancyInput, 'value');
expect(result).toEqual('1');
});
expect(result).toEqual('1');
});
it(`should confirm the item origin was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBasicData.originSelect);
it(`should confirm the item origin was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.originSelect, 'value')
.getProperty(selectors.itemBasicData.originSelect, 'value');
expect(result).toEqual('Spain');
});
expect(result).toEqual('Spain');
});
it(`should confirm the item expence was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBasicData.expenceSelect);
it(`should confirm the item expence was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.expenceSelect, 'value')
.getProperty(selectors.itemBasicData.expenceSelect, 'value');
expect(result).toEqual('Adquisición mercancia Extracomunitaria');
});
expect(result).toEqual('Adquisición mercancia Extracomunitaria');
});
it(`should confirm the item long name was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBasicData.longNameInput);
it(`should confirm the item long name was edited`, async () => {
const result = await nightmare
.waitProperty(selectors.itemBasicData.longNameInput, 'value')
.getProperty(selectors.itemBasicData.longNameInput, 'value');
expect(result).toEqual('RS Rose of Purity');
});
expect(result).toEqual('RS Rose of Purity');
});
it('should confirm isActive checkbox is unchecked', async () => {
const result = await nightmare
.evaluate((selector) => {
return document.querySelector(selector).checked;
}, selectors.itemBasicData.isActiveCheckbox);
it('should confirm isActive checkbox is unchecked', async () => {
const result = await nightmare
.evaluate(selector => {
return document.querySelector(selector).checked;
}, selectors.itemBasicData.isActiveCheckbox);
expect(result).toBeFalsy();
});
expect(result).toBeFalsy();
});
});

View File

@ -5,7 +5,7 @@ describe('Item edit tax path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('buyer');
});

View File

@ -5,7 +5,7 @@ describe('Item create tags path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('buyer');
});

View File

@ -5,7 +5,7 @@ describe('Item create niche path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('buyer');
});

View File

@ -1,101 +1,86 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Item', () => {
describe('Create botanical path', () => {
const nightmare = createNightmare();
describe('Item Create botanical path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
beforeAll(() => {
nightmare
.waitForLogin('buyer');
});
});
it('should access to the items index by clicking the items button', done => {
return nightmare
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl()
.then(url => {
expect(url.hash).toEqual('#!/item/index');
done();
}).catch(done.fail);
});
.parsedUrl();
it('should search for the item Mjolnir', done => {
return nightmare
expect(url.hash).toEqual('#!/item/index');
});
it('should search for the item Mjolnir', async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult)
.then(result => {
expect(result).toEqual(1);
done();
}).catch(done.fail);
});
.countElement(selectors.itemsIndex.searchResult);
it(`should click on the search result to access to the item botanical`, done => {
return nightmare
expect(result).toEqual(1);
});
it(`should click on the search result to access to the item botanical`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Mjolnir')
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemBotanical.botanicalButton)
.waitForURL('botanical')
.url()
.then(url => {
expect(url).toContain('botanical');
done();
}).catch(done.fail);
});
.url();
it(`should create a new botanical for the item with id Mjolnir`, done => {
return nightmare
expect(url).toContain('botanical');
});
it(`should create a new botanical for the item with id Mjolnir`, async () => {
const result = await nightmare
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
.waitToClick(selectors.itemBotanical.genusSelect)
.waitToClick(selectors.itemBotanical.genusSelectOptionOne)
.waitToClick(selectors.itemBotanical.speciesSelect)
.waitToClick(selectors.itemBotanical.speciesSelectOptionOne)
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
.waitForLastSnackbar()
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).catch(done.fail);
});
.waitForLastSnackbar();
it(`should confirm the botanical for item Mjolnir was created`, done => {
return nightmare
expect(result).toEqual('Data saved!');
});
it(`should confirm the botanical for item Mjolnir was created`, async () => {
const result = await nightmare
.click(selectors.itemBasicData.basicDataButton)
.wait(selectors.itemBasicData.nameInput)
.click(selectors.itemBotanical.botanicalButton)
.waitForTextInInput(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
.getInputValue(selectors.itemBotanical.botanicalInput)
.then(result => {
expect(result).toEqual('Cicuta maculata');
done();
}).catch(done.fail);
});
.getInputValue(selectors.itemBotanical.botanicalInput);
it(`should confirm the Genus for item Mjolnir was created`, done => {
return nightmare
expect(result).toEqual('Cicuta maculata');
});
it(`should confirm the Genus for item Mjolnir was created`, async () => {
const result = await nightmare
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abelia')
.getInputValue(selectors.itemBotanical.genusSelect)
.then(result => {
expect(result).toEqual('Abelia');
done();
}).catch(done.fail);
});
.getInputValue(selectors.itemBotanical.genusSelect);
it(`should confirm the Species for item Mjolnir was created`, done => {
return nightmare
.getInputValue(selectors.itemBotanical.speciesSelect)
.then(result => {
expect(result).toEqual('dealbata');
done();
}).catch(done.fail);
});
expect(result).toEqual('Abelia');
});
it(`should edit botanical for the item Mjolnir`, done => {
return nightmare
it(`should confirm the Species for item Mjolnir was created`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBotanical.speciesSelect);
expect(result).toEqual('dealbata');
});
it(`should edit botanical for the item Mjolnir`, async () => {
const result = await nightmare
.clearInput(selectors.itemBotanical.botanicalInput)
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
.waitToClick(selectors.itemBotanical.genusSelect)
@ -103,43 +88,34 @@ describe('Item', () => {
.waitToClick(selectors.itemBotanical.speciesSelect)
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
.waitForLastSnackbar()
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).catch(done.fail);
});
.waitForLastSnackbar();
it(`should confirm the botanical for item Mjolnir was edited`, done => {
return nightmare
expect(result).toEqual('Data saved!');
});
it(`should confirm the botanical for item Mjolnir was edited`, async () => {
const result = await nightmare
.click(selectors.itemBasicData.basicDataButton)
.wait(selectors.itemBasicData.nameInput)
.click(selectors.itemBotanical.botanicalButton)
.waitForTextInInput(selectors.itemBotanical.botanicalInput, 'Herp Derp')
.getInputValue(selectors.itemBotanical.botanicalInput)
.then(result => {
expect(result).toEqual('Herp Derp');
done();
}).catch(done.fail);
});
.getInputValue(selectors.itemBotanical.botanicalInput);
it(`should confirm the Genus for item Mjolnir was edited`, done => {
return nightmare
expect(result).toEqual('Herp Derp');
});
it(`should confirm the Genus for item Mjolnir was edited`, async () => {
const result = await nightmare
.waitForTextInInput(selectors.itemBotanical.genusSelect, 'Abies')
.getInputValue(selectors.itemBotanical.genusSelect)
.then(result => {
expect(result).toEqual('Abies');
done();
}).catch(done.fail);
});
.getInputValue(selectors.itemBotanical.genusSelect);
it(`should confirm the Species for item Mjolnir was edited`, done => {
return nightmare
.getInputValue(selectors.itemBotanical.speciesSelect)
.then(result => {
expect(result).toEqual('decurrens');
done();
}).catch(done.fail);
});
expect(result).toEqual('Abies');
});
it(`should confirm the Species for item Mjolnir was edited`, async () => {
const result = await nightmare
.getInputValue(selectors.itemBotanical.speciesSelect);
expect(result).toEqual('decurrens');
});
});

View File

@ -1,77 +1,65 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Item', () => {
describe('Create barcodes path', () => {
const nightmare = createNightmare();
describe('Item Create barcodes path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
beforeAll(() => {
nightmare
.waitForLogin('buyer');
});
});
it('should access to the items index by clicking the items button', done => {
return nightmare
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl()
.then(url => {
expect(url.hash).toEqual('#!/item/index');
done();
}).catch(done.fail);
});
.parsedUrl();
it('should search for the item Gem of Time', done => {
return nightmare
expect(url.hash).toEqual('#!/item/index');
});
it('should search for the item Gem of Time', async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult)
.then(result => {
expect(result).toEqual(1);
done();
}).catch(done.fail);
});
.countElement(selectors.itemsIndex.searchResult);
it(`should click on the search result to access to the item barcodes`, done => {
return nightmare
expect(result).toEqual(1);
});
it(`should click on the search result to access to the item barcodes`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemBarcodes.barcodeButton)
.waitForURL('barcode')
.url()
.then(url => {
expect(url).toContain('barcode');
done();
}).catch(done.fail);
});
.url();
it(`should click create a new code and delete a former one`, done => {
return nightmare
expect(url).toContain('barcode');
});
it(`should click create a new code and delete a former one`, async () => {
const result = await nightmare
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
.wait(selectors.itemBarcodes.thirdCodeInput)
.type(selectors.itemBarcodes.thirdCodeInput, '5')
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
.waitForLastSnackbar()
.then(result => {
expect(result).toEqual('Data saved!');
done();
}).catch(done.fail);
});
.waitForLastSnackbar();
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, done => {
return nightmare
expect(result).toEqual('Data saved!');
});
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async () => {
const result = await nightmare
.click(selectors.itemBasicData.basicDataButton)
.wait(selectors.itemBasicData.nameInput)
.click(selectors.itemBarcodes.barcodeButton)
.waitForTextInInput(selectors.itemBarcodes.thirdCodeInput, '5')
.getInputValue(selectors.itemBarcodes.thirdCodeInput)
.then(result => {
expect(result).toEqual('5');
done();
}).catch(done.fail);
});
.getInputValue(selectors.itemBarcodes.thirdCodeInput);
expect(result).toEqual('5');
});
});

View File

@ -1,145 +1,143 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare';
describe('Item', () => {
describe('Item Create path', () => {
const nightmare = createNightmare();
describe('Create path', () => {
beforeAll(() => {
return nightmare
.waitForLogin('buyer');
});
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/index');
});
it(`should search for the item Infinity Gauntlet to confirm it isn't created yet`, async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
.countElement(selectors.itemsIndex.searchResult);
expect(result).toEqual(0);
});
it('should access to the create item view by clicking the create floating button', async () => {
const url = await nightmare
.click(selectors.itemsIndex.createItemButton)
.wait(selectors.itemCreateView.createButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/create');
});
it('should return to the item index by clickig the cancel button', async () => {
const url = await nightmare
.click(selectors.itemCreateView.cancelButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/index');
});
it('should now access to the create item view by clicking the create floating button', async () => {
const url = await nightmare
.click(selectors.itemsIndex.createItemButton)
.wait(selectors.itemCreateView.createButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/create');
});
it('should create the Infinity Gauntlet item', async () => {
const result = await nightmare
.type(selectors.itemCreateView.name, 'Infinity Gauntlet')
.waitToClick(selectors.itemCreateView.typeSelect)
.waitToClick(selectors.itemCreateView.typeSelectOptionThree)
.waitToClick(selectors.itemCreateView.intrastatSelect)
.waitToClick(selectors.itemCreateView.intrastatSelectOptionOne)
.waitToClick(selectors.itemCreateView.originSelect)
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
.click(selectors.itemCreateView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
it('should confirm Infinity Gauntlet item was created', async () => {
let result = await nightmare
.wait(selectors.itemBasicData.nameInput)
.getInputValue(selectors.itemBasicData.nameInput);
expect(result).toEqual('Infinity Gauntlet');
result = await nightmare
.getInputValue(selectors.itemBasicData.typeSelect);
expect(result).toEqual('Crisantemo');
result = await nightmare
.waitProperty(selectors.itemBasicData.intrastatSelect, 'value')
.getProperty(selectors.itemBasicData.intrastatSelect, 'value');
expect(result).toEqual('6021010 Plantas vivas: Esqueje/injerto, Vid');
result = await nightmare
.getInputValue(selectors.itemBasicData.originSelect);
expect(result).toEqual('Spain');
});
beforeAll(() => {
nightmare
.waitForLogin('buyer');
});
describe('Clone path', () => {
it('should return to the items index by clicking the return to items button', async () => {
const url = await nightmare
.click(selectors.itemBasicData.goToItemIndexButton)
.wait(selectors.itemsIndex.createItemButton)
.waitForURL('#!/item/index')
.parsedUrl();
it('should access to the items index by clicking the items button', async () => {
const url = await nightmare
.click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
expect(url.hash).toContain('#!/item/index');
});
expect(url.hash).toEqual('#!/item/index');
});
it(`should search for the item Infinity Gauntlet`, async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
it(`should search for the item Infinity Gauntlet to confirm it isn't created yet`, async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 0)
.countElement(selectors.itemsIndex.searchResult);
expect(result).toEqual(1);
});
expect(result).toEqual(0);
});
it(`should clone the Infinity Gauntlet`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchResultCloneButton)
.waitToClick(selectors.itemsIndex.acceptClonationAlertButton)
.waitForURL('tags')
.parsedUrl();
it('should access to the create item view by clicking the create floating button', async () => {
const url = await nightmare
.click(selectors.itemsIndex.createItemButton)
.wait(selectors.itemCreateView.createButton)
.parsedUrl();
expect(url.hash).toContain('tags');
});
expect(url.hash).toEqual('#!/item/create');
});
it('should search for the item Infinity Gauntlet and find two', async () => {
const result = await nightmare
.waitToClick(selectors.itemTags.goToItemIndexButton)
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2)
.countElement(selectors.itemsIndex.searchResult);
it('should return to the item index by clickig the cancel button', async () => {
const url = await nightmare
.click(selectors.itemCreateView.cancelButton)
.wait(selectors.itemsIndex.createItemButton)
.parsedUrl();
expect(result).toEqual(2);
});
expect(url.hash).toEqual('#!/item/index');
});
it('should now access to the create item view by clicking the create floating button', async () => {
const url = await nightmare
.click(selectors.itemsIndex.createItemButton)
.wait(selectors.itemCreateView.createButton)
.parsedUrl();
expect(url.hash).toEqual('#!/item/create');
});
it('should create the Infinity Gauntlet item', async () => {
const result = await nightmare
.type(selectors.itemCreateView.name, 'Infinity Gauntlet')
.waitToClick(selectors.itemCreateView.typeSelect)
.waitToClick(selectors.itemCreateView.typeSelectOptionThree)
.waitToClick(selectors.itemCreateView.intrastatSelect)
.waitToClick(selectors.itemCreateView.intrastatSelectOptionOne)
.waitToClick(selectors.itemCreateView.originSelect)
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
.click(selectors.itemCreateView.createButton)
.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
it('should confirm Infinity Gauntlet item was created', async () => {
let result = await nightmare
.wait(selectors.itemBasicData.nameInput)
.getInputValue(selectors.itemBasicData.nameInput);
expect(result).toEqual('Infinity Gauntlet');
result = await nightmare
.getInputValue(selectors.itemBasicData.typeSelect);
expect(result).toEqual('Crisantemo');
result = await nightmare
.waitProperty(selectors.itemBasicData.intrastatSelect, 'value')
.getProperty(selectors.itemBasicData.intrastatSelect, 'value');
expect(result).toEqual('6021010 Plantas vivas: Esqueje/injerto, Vid');
result = await nightmare
.getInputValue(selectors.itemBasicData.originSelect);
expect(result).toEqual('Spain');
});
});
describe('Clone path', () => {
it('should return to the items index by clicking the return to items button', async () => {
const url = await nightmare
.click(selectors.itemBasicData.goToItemIndexButton)
.wait(selectors.itemsIndex.createItemButton)
.waitForURL('#!/item/index')
.parsedUrl();
expect(url.hash).toContain('#!/item/index');
});
it(`should search for the item Infinity Gauntlet`, async () => {
const result = await nightmare
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
expect(result).toEqual(1);
});
it(`should clone the Infinity Gauntlet`, async () => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchResultCloneButton)
.waitToClick(selectors.itemsIndex.acceptClonationAlertButton)
.waitForURL('tags')
.parsedUrl();
expect(url.hash).toContain('tags');
});
it('should search for the item Infinity Gauntlet and find two', async () => {
const result = await nightmare
.waitToClick(selectors.itemTags.goToItemIndexButton)
.wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet')
.click(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 2)
.countElement(selectors.itemsIndex.searchResult);
expect(result).toEqual(2);
});
});

View File

@ -4,7 +4,7 @@ import createNightmare from '../../helpers/nightmare';
describe('Item regularize path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
nightmare
.waitForLogin('developer');
});