We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19b743d + 172d522 commit 32d8afdCopy full SHA for 32d8afd
1 file changed
src/app/component/top-header/top-header.component.spec.ts
@@ -21,4 +21,19 @@ describe('TopHeaderComponent', () => {
21
it('should create', () => {
22
expect(component).toBeTruthy();
23
});
24
+
25
+ it('check if header is being generated', () => {
26
+ const HTMLElement: HTMLElement = fixture.nativeElement;
27
+ const heading = HTMLElement.querySelector('h1')!;
28
+ expect(heading.textContent).toEqual('Default');
29
+ });
30
31
+ it('check if header is being changed', () => {
32
+ const changedTextElement = 'changed';
33
+ component.section = changedTextElement;
34
+ fixture.detectChanges();
35
36
37
+ expect(heading.textContent).toEqual('changed');
38
39
0 commit comments