Skip to content

Commit b5e004d

Browse files
committed
Even more tests
1 parent 03231b6 commit b5e004d

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

src/app/component/task-description/task-description.component.spec.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,26 @@ describe('TaskDescriptionComponent', () => {
3535
component.currentTask.subDimension = testSubDimension;
3636
fixture.detectChanges();
3737
const HTMLElement: HTMLElement = fixture.nativeElement;
38-
console.log(HTMLElement);
3938
const heading = HTMLElement.querySelector('h1')!;
4039
expect(heading.textContent).toContain(testDimension);
4140
expect(heading.textContent).toContain(testSubDimension);
4241
});
42+
43+
it('check if description is being genenrated', () => {
44+
const testDescription = 'Sample Description';
45+
component.currentTask.description = testDescription;
46+
fixture.detectChanges();
47+
const HTMLElement: HTMLElement = fixture.nativeElement;
48+
const heading = HTMLElement.querySelectorAll('p')!;
49+
expect(heading[0].textContent).toContain(testDescription);
50+
});
51+
52+
it('check if risk is being genenrated', () => {
53+
const testRisk = 'Sample Risk';
54+
component.currentTask.risk = testRisk;
55+
fixture.detectChanges();
56+
const HTMLElement: HTMLElement = fixture.nativeElement;
57+
const heading = HTMLElement.querySelectorAll('p')!;
58+
expect(heading[1].textContent).toContain(testRisk);
59+
});
4360
});

0 commit comments

Comments
 (0)