corrected maxTimer usage in gulpfile watiForMySQL task plus some more e2e tests for the greuge path
This commit is contained in:
parent
9ea6be5333
commit
49486f302e
|
@ -129,6 +129,9 @@ export default {
|
|||
greugeButton: `${components.vnMenuItem}[ui-sref="clientCard.greuge.list"]`,
|
||||
addGreugeFloatButton: `${components.vnFloatButton}`,
|
||||
amountInput: `${components.vnTextfield}[name="Amount"]`,
|
||||
descriptionInput: `${components.vnTextfield}[name="Description"]`,
|
||||
typeInput: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] > vn-vertical > ${components.vnTextfield}`,
|
||||
typeSecondOption: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] > vn-vertical > vn-drop-down > vn-vertical > vn-auto:nth-child(2) > ul > li`,
|
||||
saveButton: `${components.vnSubmit}`
|
||||
// firstGreugeText: ''
|
||||
}
|
||||
|
|
|
@ -96,7 +96,19 @@ fdescribe('Add greuge path', () => {
|
|||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
it(`should add a new greuge`, done => {
|
||||
it(`should receive an error if all fields are empty but date on submit`, done => {
|
||||
nightmare
|
||||
.click(selectors.credit.saveButton)
|
||||
.wait(selectors.globalItems.snackbarIsActive)
|
||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||
.then(result => {
|
||||
expect(result).toContain('Error');
|
||||
done();
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
it(`should receive an error if all fields are empty but date and amount on submit`, done => {
|
||||
nightmare
|
||||
.type(selectors.greuge.amountInput, 999)
|
||||
.click(selectors.credit.saveButton)
|
||||
|
@ -109,15 +121,32 @@ fdescribe('Add greuge path', () => {
|
|||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
// it('should confirm the credit was updated', done => {
|
||||
// nightmare
|
||||
// .waitForSnackbarReset()
|
||||
// .wait(selectors.credit.firstCreditText)
|
||||
// .getInnerText(selectors.credit.firstCreditText)
|
||||
// .then(value => {
|
||||
// expect(value).toContain(999);
|
||||
// done();
|
||||
// })
|
||||
// .catch(catchErrors(done));
|
||||
// });
|
||||
it(`should receive an error if all fields are empty but date and amount on submit`, done => {
|
||||
nightmare
|
||||
.clearInput(selectors.greuge.amountInput)
|
||||
.type(selectors.greuge.descriptionInput, 'Bat-flying suite with anti-APCR rounds')
|
||||
.click(selectors.credit.saveButton)
|
||||
.wait(selectors.globalItems.snackbarIsActive)
|
||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||
.then(result => {
|
||||
expect(result).toContain('Error');
|
||||
done();
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
});
|
||||
|
||||
it(`should receive an error if all fields are empty but date and type on submit`, done => {
|
||||
nightmare
|
||||
.clearInput(selectors.greuge.descriptionInput)
|
||||
.waitToClick(selectors.greuge.typeInput)
|
||||
.waitToClick(selectors.greuge.typeSecondOption)
|
||||
.click(selectors.credit.saveButton)
|
||||
.wait(selectors.globalItems.snackbarIsActive)
|
||||
.getInnerText(selectors.globalItems.snackbarIsActive)
|
||||
.then(result => {
|
||||
expect(result).toContain('Error');
|
||||
done();
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -188,7 +188,7 @@ gulp.task('waitForMySQL', callback => {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
console.log('MySQL connection not established whithin 15 secs!');
|
||||
console.log(`MySQL connection not established whithin ${maxInterval / 1000} secs!`);
|
||||
clearInterval(waitForLocaldb);
|
||||
}
|
||||
}, interval);
|
||||
|
|
Loading…
Reference in New Issue