Skip to content

Commit 8f48740

Browse files
committed
clearing the art_body and testing
1 parent c48464f commit 8f48740

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/app/solicitation/summary/results-detail/art-modal/art-modal.component.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,16 @@ describe('ArtIframeDialogComponent', () => {
3535
it('should create', () => {
3636
expect(component).toBeTruthy();
3737
});
38+
39+
it('should clear art_body on clearAll', () => {
40+
component.art_body = { someKey: 'someValue' };
41+
component.clearAll();
42+
expect(component.art_body).toEqual({});
43+
});
44+
45+
it('should clear art_body on updateLanguage', () => {
46+
component.art_body = { someKey: 'someValue' };
47+
component.updateLanguage();
48+
expect(component.art_body).toEqual({});
49+
});
3850
});

src/app/solicitation/summary/results-detail/art-modal/art-modal.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ export class ArtIframeDialogComponent {
257257

258258
}
259259

260+
this.art_body = {};
261+
260262
},
261263
error: error => {
262264
let errors: string[] = [];
@@ -291,6 +293,7 @@ export class ArtIframeDialogComponent {
291293
this.selectedSubcategories = [];
292294
this.display = 'none';
293295
this.art_language = null;
296+
this.art_body = {};
294297

295298
this.categories.forEach(category => {
296299
category.isChecked = false
@@ -371,6 +374,7 @@ export class ArtIframeDialogComponent {
371374
}
372375

373376
this.art_language = []; // Remove art language
377+
this.art_body = {}; // Remove art body
374378
this.display = 'none';
375379
}
376380

0 commit comments

Comments
 (0)