diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 5ad78097f..414595ce2 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -570,8 +570,8 @@ export default { workerAutoComplete: 'vn-route-basic-data vn-autocomplete[field="$ctrl.route.workerFk"]', vehicleAutoComplete: 'vn-route-basic-data vn-autocomplete[field="$ctrl.route.vehicleFk"]', agencyAutoComplete: 'vn-route-basic-data vn-autocomplete[field="$ctrl.route.agencyModeFk"]', - kmStartInput: 'vn-route-basic-data vn-textfield[field="$ctrl.route.kmStart"] input', - kmEndInput: 'vn-route-basic-data vn-textfield[model="$ctrl.route.kmEnd"] input', + kmStartInput: 'vn-route-basic-data vn-input-number[field="$ctrl.route.kmStart"] input', + kmEndInput: 'vn-route-basic-data vn-input-number[model="$ctrl.route.kmEnd"] input', createdDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.created"] > div > input', startedDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.started"] > div > input', finishedDateInput: 'vn-route-basic-data vn-date-picker[model="$ctrl.route.finished"] > div > input', diff --git a/e2e/paths/ticket-module/04_create_ticket_packages.spec.js b/e2e/paths/ticket-module/04_create_ticket_packages.spec.js index b800f9069..a90be4a48 100644 --- a/e2e/paths/ticket-module/04_create_ticket_packages.spec.js +++ b/e2e/paths/ticket-module/04_create_ticket_packages.spec.js @@ -22,15 +22,6 @@ describe('Ticket Create packages path', () => { expect(result).toEqual('Some fields are invalid'); }); - it(`should attempt create a new package but receive an error if quantity is a string`, async() => { - const result = await nightmare - .write(selectors.ticketPackages.firstQuantityInput, 'ninety 9') - .waitToClick(selectors.ticketPackages.savePackagesButton) - .waitForLastSnackbar(); - - expect(result).toEqual('Some fields are invalid'); - }); - it(`should attempt create a new package but receive an error if quantity is 0`, async() => { const result = await nightmare .clearInput(selectors.ticketPackages.firstQuantityInput) @@ -44,7 +35,7 @@ describe('Ticket Create packages path', () => { it(`should attempt create a new package but receive an error if package is blank`, async() => { const result = await nightmare .clearInput(selectors.ticketPackages.firstQuantityInput) - .write(selectors.ticketPackages.firstQuantityInput, 99) + .write(selectors.ticketPackages.firstQuantityInput, 'text and 99') .waitToClick(selectors.ticketPackages.clearPackageAutocompleteButton) .waitToClick(selectors.ticketPackages.savePackagesButton) .waitForLastSnackbar(); @@ -70,7 +61,7 @@ describe('Ticket Create packages path', () => { expect(result).toEqual('7 : Container medical box 1m'); }); - it(`should confirm the first quantity is the expected one`, async() => { + it(`should confirm the first quantity is just a number and the string part was ignored by the imput number`, async() => { const result = await nightmare .waitForTextInInput(selectors.ticketPackages.firstQuantityInput, '99') .waitToGetProperty(selectors.ticketPackages.firstQuantityInput, 'value');