e2e fixes for input number
This commit is contained in:
parent
cfdeb387a1
commit
96ef293151
|
@ -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',
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue