63669: ContentSource tests pt1

This commit is contained in:
Kristof De Langhe
2019-07-12 17:43:19 +02:00
parent 7774c3c83c
commit 1e56f03785
2 changed files with 174 additions and 14 deletions

View File

@@ -229,20 +229,22 @@ export class CollectionSourceComponent extends AbstractTrackableComponent implem
map((updates: FieldUpdates) => updates[initialContentSource.uuid])
);
this.updateSub = this.update$.subscribe((update: FieldUpdate) => {
const field = update.field as ContentSource;
this.formGroup.patchValue({
providerContainer: {
provider: field.provider
},
setContainer: {
set: field.set,
format: field.format
},
harvestContainer: {
harvest: field.harvest
}
});
this.contentSource = cloneDeep(field);
if (update) {
const field = update.field as ContentSource;
this.formGroup.patchValue({
providerContainer: {
provider: field.provider
},
setContainer: {
set: field.set,
format: field.format
},
harvestContainer: {
harvest: field.harvest
}
});
this.contentSource = cloneDeep(field);
}
this.switchEnableForm();
});
}