diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3c11a5fbb..a54ed048c 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -486,6 +486,7 @@ export default { orderBasicData: { clientAutocomplete: `vn-autocomplete[label="Client"]`, addressAutocomplete: `vn-autocomplete[label="Address"]`, + agencyAutocomplete: `vn-autocomplete[label="Agency"]`, observationInput: `vn-textarea[label="Observation"] textarea`, saveButton: `${components.vnSubmit}` }, diff --git a/e2e/paths/order-module/01_edit_basic_data.spec.js b/e2e/paths/order-module/01_edit_basic_data.spec.js index 0efcc4f8c..633c9d338 100644 --- a/e2e/paths/order-module/01_edit_basic_data.spec.js +++ b/e2e/paths/order-module/01_edit_basic_data.spec.js @@ -64,6 +64,7 @@ describe('Order edit basic data path', () => { const result = await nightmare .autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark') .autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark') + .autocompleteSearch(selectors.orderBasicData.agencyAutocomplete, 'Silla247') .clearInput(selectors.orderBasicData.observationInput) .write(selectors.orderBasicData.observationInput, 'Observation modified') .waitToClick(selectors.orderBasicData.saveButton) @@ -80,6 +81,13 @@ describe('Order edit basic data path', () => { 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() => { const result = await nightmare .waitToGetProperty(selectors.orderBasicData.observationInput, 'value');