test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-03-11 09:17:14 +01:00
parent d35634551b
commit e92030ec6e
3 changed files with 5 additions and 11 deletions

View File

@ -186,7 +186,6 @@ export default class Watcher extends Component {
* Checks if data is ready to send.
*/
isInvalid() {
console.log(this.form.$invalid);
if (this.form && this.form.$invalid)
throw new UserError('Some fields are invalid');
}

View File

@ -29,18 +29,14 @@ describe('Travel Component vnTravelCreate', () => {
describe('$onChanges()', () => {
it('should update the travel data when stateParams.q is defined', () => {
controller.$stateParams = {q: {
ref: 1,
agencyModeFk: 1
}};
controller.$stateParams = {q: '{"ref": 1,"agencyModeFk": 1}'};
const params = {q: '{"ref": 1, "agencyModeFk": 1}'};
const json = JSON.parse(params.q);
const result = {q: {
ref: 1,
agencyModeFk: 1
}};
controller.$onChanges();
expect(controller._travel).toBe(result);
expect(controller._travel).toEqual(json);
});
});
});

View File

@ -45,7 +45,6 @@ export default class Controller {
if (!(response == 'accept' && this.travelSelected))
return;
if (this.travelSelected) {
console.log('this.travelSelected', this.travelSelected);
const travel = {
ref: this.travelSelected.ref,
agencyModeFk: this.travelSelected.agencyFk,