e2e now changes the agency

This commit is contained in:
Gerard 2019-02-20 08:24:10 +01:00
parent de5a15778e
commit c8623ef3da
2 changed files with 9 additions and 0 deletions

View File

@ -486,6 +486,7 @@ export default {
orderBasicData: { orderBasicData: {
clientAutocomplete: `vn-autocomplete[label="Client"]`, clientAutocomplete: `vn-autocomplete[label="Client"]`,
addressAutocomplete: `vn-autocomplete[label="Address"]`, addressAutocomplete: `vn-autocomplete[label="Address"]`,
agencyAutocomplete: `vn-autocomplete[label="Agency"]`,
observationInput: `vn-textarea[label="Observation"] textarea`, observationInput: `vn-textarea[label="Observation"] textarea`,
saveButton: `${components.vnSubmit}` saveButton: `${components.vnSubmit}`
}, },

View File

@ -64,6 +64,7 @@ describe('Order edit basic data path', () => {
const result = await nightmare const result = await nightmare
.autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark') .autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark')
.autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark') .autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark')
.autocompleteSearch(selectors.orderBasicData.agencyAutocomplete, 'Silla247')
.clearInput(selectors.orderBasicData.observationInput) .clearInput(selectors.orderBasicData.observationInput)
.write(selectors.orderBasicData.observationInput, 'Observation modified') .write(selectors.orderBasicData.observationInput, 'Observation modified')
.waitToClick(selectors.orderBasicData.saveButton) .waitToClick(selectors.orderBasicData.saveButton)
@ -80,6 +81,13 @@ describe('Order edit basic data path', () => {
expect(result).toEqual('104: Tony Stark'); expect(result).toEqual('104: Tony Stark');
}); });
it('should now confirm the agency have been edited', async() => {
const result = await nightmare
.waitToGetProperty(`${selectors.orderBasicData.agencyAutocomplete} input`, 'value');
expect(result).toEqual('7: Silla247');
});
it('should now confirm the observations have been edited', async() => { it('should now confirm the observations have been edited', async() => {
const result = await nightmare const result = await nightmare
.waitToGetProperty(selectors.orderBasicData.observationInput, 'value'); .waitToGetProperty(selectors.orderBasicData.observationInput, 'value');