#639 Refacto e2e waitForSnackbar + error corrections
This commit is contained in:
parent
df02c35068
commit
38633c1fef
|
@ -65,9 +65,9 @@ describe('Client', () => {
|
||||||
it('should receive an error when clicking the create button having all the form fields empty', () => {
|
it('should receive an error when clicking the create button having all the form fields empty', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -79,9 +79,9 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.createClientView.salesPersonInput)
|
.waitToClick(selectors.createClientView.salesPersonInput)
|
||||||
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ describe('Client', () => {
|
||||||
.clearInput(selectors.createClientView.email)
|
.clearInput(selectors.createClientView.email)
|
||||||
.type(selectors.createClientView.email, 'incorrect email format')
|
.type(selectors.createClientView.email, 'incorrect email format')
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -103,9 +103,9 @@ describe('Client', () => {
|
||||||
.clearInput(selectors.createClientView.email)
|
.clearInput(selectors.createClientView.email)
|
||||||
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,9 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientBasicData.channelInput)
|
.waitToClick(selectors.clientBasicData.channelInput)
|
||||||
.waitToClick(selectors.clientBasicData.channelMetropolisOption)
|
.waitToClick(selectors.clientBasicData.channelMetropolisOption)
|
||||||
.click(selectors.clientBasicData.saveButton)
|
.click(selectors.clientBasicData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -109,18 +109,18 @@ describe('Client Edit fiscalData path', () => {
|
||||||
.waitToClick(selectors.clientFiscalData.equalizationTaxCheckboxLabel)
|
.waitToClick(selectors.clientFiscalData.equalizationTaxCheckboxLabel)
|
||||||
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should propagate the Equalization tax', () => {
|
it('should propagate the Equalization tax', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Equivalent tax spreaded']));
|
expect(result).toEqual('Equivalent tax spreaded');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -315,9 +315,9 @@ describe('Client Edit fiscalData path', () => {
|
||||||
.waitToClick(selectors.clientAddresses.firstEditButton)
|
.waitToClick(selectors.clientAddresses.firstEditButton)
|
||||||
.waitToClick(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
.waitToClick(selectors.clientAddresses.equalizationTaxCheckboxLabel)
|
||||||
.click(selectors.clientAddresses.saveButton)
|
.click(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -58,9 +58,9 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox)
|
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox)
|
||||||
.waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox)
|
.waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox)
|
||||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['That payment method requires an IBAN']));
|
expect(result).toEqual('That payment method requires an IBAN');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -88,9 +88,9 @@ describe('Client', () => {
|
||||||
.type(selectors.clientAddresses.phoneInput, '999887744')
|
.type(selectors.clientAddresses.phoneInput, '999887744')
|
||||||
.type(selectors.clientAddresses.mobileInput, '999887744')
|
.type(selectors.clientAddresses.mobileInput, '999887744')
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -100,9 +100,9 @@ describe('Client', () => {
|
||||||
.type(selectors.clientAddresses.streetAddressInput, '320 Park Avenue New York')
|
.type(selectors.clientAddresses.streetAddressInput, '320 Park Avenue New York')
|
||||||
.type(selectors.clientAddresses.cityInput, 'New York')
|
.type(selectors.clientAddresses.cityInput, 'New York')
|
||||||
.click(selectors.clientAddresses.saveButton)
|
.click(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -141,9 +141,9 @@ describe('Client', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientAddresses.activeCheckbox)
|
.waitToClick(selectors.clientAddresses.activeCheckbox)
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['The default consignee can not be unchecked']));
|
expect(result).toEqual('The default consignee can not be unchecked');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -62,9 +62,9 @@ describe('Client add address notes path', () => {
|
||||||
.wait(selectors.clientAddresses.firstObservationDescriptionInput)
|
.wait(selectors.clientAddresses.firstObservationDescriptionInput)
|
||||||
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
.type(selectors.clientAddresses.firstObservationDescriptionInput, 'first description')
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Observation type cannot be blank']));
|
expect(result).toEqual('Observation type cannot be blank');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ describe('Client add address notes path', () => {
|
||||||
.waitToClick(selectors.clientAddresses.firstObservationTypeSelect)
|
.waitToClick(selectors.clientAddresses.firstObservationTypeSelect)
|
||||||
.waitToClick(selectors.clientAddresses.firstObservationTypeSelectOptionOne)
|
.waitToClick(selectors.clientAddresses.firstObservationTypeSelectOptionOne)
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -88,9 +88,9 @@ describe('Client add address notes path', () => {
|
||||||
.waitToClick(selectors.clientAddresses.secondObservationTypeSelectOptionTwo)
|
.waitToClick(selectors.clientAddresses.secondObservationTypeSelectOptionTwo)
|
||||||
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
.type(selectors.clientAddresses.secondObservationDescriptionInput, 'second description')
|
||||||
.waitToClick(selectors.clientAddresses.saveButton)
|
.waitToClick(selectors.clientAddresses.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -52,9 +52,9 @@ describe('Client', () => {
|
||||||
.clearInput(selectors.clientWebAccess.userNameInput)
|
.clearInput(selectors.clientWebAccess.userNameInput)
|
||||||
.type(selectors.clientWebAccess.userNameInput, 'Hulk')
|
.type(selectors.clientWebAccess.userNameInput, 'Hulk')
|
||||||
.waitToClick(selectors.clientWebAccess.saveButton)
|
.waitToClick(selectors.clientWebAccess.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,9 @@ describe('Client', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
|
.type(selectors.clientNotes.noteInput, 'Meeting with Black Widow 21st 9am')
|
||||||
.click(selectors.clientNotes.saveButton)
|
.click(selectors.clientNotes.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,9 @@ describe('Client', () => {
|
||||||
.clearInput(selectors.clientCredit.creditInput)
|
.clearInput(selectors.clientCredit.creditInput)
|
||||||
.type(selectors.clientCredit.creditInput, 999)
|
.type(selectors.clientCredit.creditInput, 999)
|
||||||
.click(selectors.clientCredit.saveButton)
|
.click(selectors.clientCredit.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,9 @@ describe('Client', () => {
|
||||||
.waitToClick(selectors.clientGreuge.typeInput)
|
.waitToClick(selectors.clientGreuge.typeInput)
|
||||||
.waitToClick(selectors.clientGreuge.typeSecondOption)
|
.waitToClick(selectors.clientGreuge.typeSecondOption)
|
||||||
.click(selectors.clientGreuge.saveButton)
|
.click(selectors.clientGreuge.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Some fields are invalid']));
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ describe('Client', () => {
|
||||||
.waitForTextInInput(selectors.clientGreuge.amountInput, '999')
|
.waitForTextInInput(selectors.clientGreuge.amountInput, '999')
|
||||||
.type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
|
.type(selectors.clientGreuge.descriptionInput, 'new armor for Batman!')
|
||||||
.click(selectors.clientGreuge.saveButton)
|
.click(selectors.clientGreuge.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ describe('Client lock verified data path', () => {
|
||||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||||
.type(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
.type(selectors.clientFiscalData.socialNameInput, 'salesPerson was here')
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -161,9 +161,9 @@ describe('Client lock verified data path', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -187,13 +187,13 @@ describe('Client lock verified data path', () => {
|
||||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||||
.type(selectors.clientFiscalData.socialNameInput, 'administrative was here')
|
.type(selectors.clientFiscalData.socialNameInput, 'administrative was here')
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the social name have been edited once and for all', () => {
|
it('should again confirm the social name have been edited', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientBasicData.basicDataButton)
|
.waitToClick(selectors.clientBasicData.basicDataButton)
|
||||||
.wait(selectors.clientBasicData.nameInput)
|
.wait(selectors.clientBasicData.nameInput)
|
||||||
|
@ -289,7 +289,7 @@ describe('Client lock verified data path', () => {
|
||||||
.waitForLogin('salesAssistant');
|
.waitForLogin('salesAssistant');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to clients index', () => {
|
it('should now navigate to clients index', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
@ -301,7 +301,7 @@ describe('Client lock verified data path', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search again for the user Petter Parker', () => {
|
it('should now search again for the user Petter Parker', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.clientsIndex.searchResult)
|
.wait(selectors.clientsIndex.searchResult)
|
||||||
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
|
||||||
|
@ -350,9 +350,9 @@ describe('Client lock verified data path', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
.waitToClick(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||||
.waitToClick(selectors.clientFiscalData.saveButton)
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -370,19 +370,19 @@ describe('Client lock verified data path', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should again edit the social name', () => {
|
it('should now edit the social name', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.clientFiscalData.socialNameInput)
|
.wait(selectors.clientFiscalData.socialNameInput)
|
||||||
.clearInput(selectors.clientFiscalData.socialNameInput)
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
||||||
.type(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here')
|
.type(selectors.clientFiscalData.socialNameInput, 'salesAssistant was here')
|
||||||
.click(selectors.clientFiscalData.saveButton)
|
.click(selectors.clientFiscalData.saveButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the social name have been edited once and for all', () => {
|
it('should now confirm the social name have been edited once and for all', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientBasicData.basicDataButton)
|
.waitToClick(selectors.clientBasicData.basicDataButton)
|
||||||
.wait(selectors.clientBasicData.nameInput)
|
.wait(selectors.clientBasicData.nameInput)
|
||||||
|
@ -402,7 +402,7 @@ describe('Client lock verified data path', () => {
|
||||||
.waitForLogin('salesPerson');
|
.waitForLogin('salesPerson');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should again click on the Clients button of the top bar menu', () => {
|
it('should now click on the Clients button of the top bar menu', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
|
|
@ -61,9 +61,9 @@ describe('Item', () => {
|
||||||
.clearInput(selectors.itemBasicData.longNameInput)
|
.clearInput(selectors.itemBasicData.longNameInput)
|
||||||
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||||
.click(selectors.itemBasicData.submitBasicDataButton)
|
.click(selectors.itemBasicData.submitBasicDataButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemTax.thirdClassSelect)
|
.waitToClick(selectors.itemTax.thirdClassSelect)
|
||||||
.waitToClick(selectors.itemTax.thirdClassSelectOptionTwo)
|
.waitToClick(selectors.itemTax.thirdClassSelectOptionTwo)
|
||||||
.click(selectors.itemTax.submitTaxButton)
|
.click(selectors.itemTax.submitTaxButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ describe('Item', () => {
|
||||||
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
||||||
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
||||||
.click(selectors.itemTags.submitItemTagsButton)
|
.click(selectors.itemTags.submitItemTagsButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption)
|
.waitToClick(selectors.itemNiches.thirdWarehouseSelectFourthOption)
|
||||||
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
.type(selectors.itemNiches.thirdCodeInput, 'A4')
|
||||||
.click(selectors.itemNiches.submitNichesButton)
|
.click(selectors.itemNiches.submitNichesButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelect)
|
.waitToClick(selectors.itemBotanical.speciesSelect)
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelectOptionOne)
|
.waitToClick(selectors.itemBotanical.speciesSelectOptionOne)
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -96,9 +96,9 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelect)
|
.waitToClick(selectors.itemBotanical.speciesSelect)
|
||||||
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
|
.waitToClick(selectors.itemBotanical.speciesSelectOptionTwo)
|
||||||
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
.waitToClick(selectors.itemBotanical.submitBotanicalButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,9 @@ describe('Item', () => {
|
||||||
.wait(selectors.itemBarcodes.thirdCodeInput)
|
.wait(selectors.itemBarcodes.thirdCodeInput)
|
||||||
.type(selectors.itemBarcodes.thirdCodeInput, '5')
|
.type(selectors.itemBarcodes.thirdCodeInput, '5')
|
||||||
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
.waitToClick(selectors.itemBarcodes.submitBarcodesButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -71,9 +71,9 @@ describe('Item', () => {
|
||||||
.waitToClick(selectors.itemCreateView.originSelect)
|
.waitToClick(selectors.itemCreateView.originSelect)
|
||||||
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
|
.waitToClick(selectors.itemCreateView.originSelectOptionOne)
|
||||||
.click(selectors.itemCreateView.createButton)
|
.click(selectors.itemCreateView.createButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ describe('Ticket', () => {
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
|
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
|
||||||
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
||||||
.click(selectors.ticketNotes.submitNotesButton)
|
.click(selectors.ticketNotes.submitNotesButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,9 @@ describe('Ticket', () => {
|
||||||
it(`should attempt create a new state but receive an error if state is empty`, () => {
|
it(`should attempt create a new state but receive an error if state is empty`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['No changes to save']));
|
expect(result).toEqual('No changes to save');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ describe('Ticket', () => {
|
||||||
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
||||||
.waitToClick(selectors.createStateView.clearStateInputButton)
|
.waitToClick(selectors.createStateView.clearStateInputButton)
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ describe('Ticket', () => {
|
||||||
.waitToClick(selectors.createStateView.stateInput)
|
.waitToClick(selectors.createStateView.stateInput)
|
||||||
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then(result => {
|
||||||
expect(result).toEqual(jasmine.arrayContaining(['Data saved!']));
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue