test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d35634551b
commit
e92030ec6e
|
@ -186,7 +186,6 @@ export default class Watcher extends Component {
|
||||||
* Checks if data is ready to send.
|
* Checks if data is ready to send.
|
||||||
*/
|
*/
|
||||||
isInvalid() {
|
isInvalid() {
|
||||||
console.log(this.form.$invalid);
|
|
||||||
if (this.form && this.form.$invalid)
|
if (this.form && this.form.$invalid)
|
||||||
throw new UserError('Some fields are invalid');
|
throw new UserError('Some fields are invalid');
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,18 +29,14 @@ describe('Travel Component vnTravelCreate', () => {
|
||||||
|
|
||||||
describe('$onChanges()', () => {
|
describe('$onChanges()', () => {
|
||||||
it('should update the travel data when stateParams.q is defined', () => {
|
it('should update the travel data when stateParams.q is defined', () => {
|
||||||
controller.$stateParams = {q: {
|
controller.$stateParams = {q: '{"ref": 1,"agencyModeFk": 1}'};
|
||||||
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();
|
controller.$onChanges();
|
||||||
|
|
||||||
expect(controller._travel).toBe(result);
|
expect(controller._travel).toEqual(json);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,7 +45,6 @@ export default class Controller {
|
||||||
if (!(response == 'accept' && this.travelSelected))
|
if (!(response == 'accept' && this.travelSelected))
|
||||||
return;
|
return;
|
||||||
if (this.travelSelected) {
|
if (this.travelSelected) {
|
||||||
console.log('this.travelSelected', this.travelSelected);
|
|
||||||
const travel = {
|
const travel = {
|
||||||
ref: this.travelSelected.ref,
|
ref: this.travelSelected.ref,
|
||||||
agencyModeFk: this.travelSelected.agencyFk,
|
agencyModeFk: this.travelSelected.agencyFk,
|
||||||
|
|
Loading…
Reference in New Issue