Skip to content

Commit 19e4048

Browse files
committed
test(got): adjust tests
1 parent f81bb68 commit 19e4048

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

projects/pretty-html-log-showcase/src/app/got-families/got-families.component.spec.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,6 @@ describe('GotFamiliesComponent', () => {
2323
fixture.detectChanges();
2424
});
2525

26-
/*
27-
it('must test the different types', () => {
28-
console.logNgHTML(fixture);
29-
(console as any).logNgHTML(fixture.debugElement);
30-
(console as any).logNgHTML(fixture.debugElement.nativeElement);
31-
(console as any).logNgHTML(fixture.debugElement.queryAll(By.css('div')));
32-
33-
const elements = fixture.debugElement.queryAll(By.css('div')).map(e => e.nativeElement);
34-
35-
(console as any).logNgHTML(fixture.debugElement.queryAll(By.css('div')).map(e => e.nativeElement));
36-
(console as any).logNgHTML('Somehting else');
37-
console.log(fixture instanceof ComponentFixture);
38-
console.log(fixture.debugElement instanceof DebugElement);
39-
40-
expect(true).toBeTruthy();
41-
});
42-
*/
43-
4426
it('should display the starks family by default', () => {
4527
const starks = ['Sansa Stark', 'Aria Stark', 'Ned Stark'];
4628
const familieMemebersElements = fixture.debugElement.queryAll(By.css('li'));
@@ -50,43 +32,6 @@ describe('GotFamiliesComponent', () => {
5032
expect(familieMembers).toEqual(starks);
5133
});
5234

53-
it(`should display the starks family by default and switch to the
54-
Targaryen family once we click on the Targaryen tab`, async () => {
55-
const starks = ['Sansa Stark', 'Aria Stark', 'Ned Stark'];
56-
const targaryens = [
57-
'Daenerys Targaryen',
58-
'Egon Targaryen',
59-
'Rhaegar Targaryen'
60-
];
61-
62-
const targaryenTab = fixture.debugElement.queryAll(
63-
By.css('.mat-tab-label')
64-
)[1];
65-
66-
const initialFamilieMemebersElements = fixture.debugElement.queryAll(
67-
By.css('li')
68-
);
69-
const initialFamilieMembers = initialFamilieMemebersElements.map(
70-
(debugElement: DebugElement) => debugElement.nativeElement.innerHTML
71-
);
72-
expect(initialFamilieMembers).toEqual(starks);
73-
74-
targaryenTab.nativeElement.click();
75-
76-
fixture.detectChanges();
77-
/*
78-
await fixture.whenStable();
79-
*/
80-
81-
const actualFamilieMemebersElements = fixture.debugElement.queryAll(
82-
By.css('li')
83-
);
84-
const actualFamilieMembers = actualFamilieMemebersElements.map(
85-
(debugElement: DebugElement) => debugElement.nativeElement.innerHTML
86-
);
87-
expect(actualFamilieMembers).toEqual(targaryens);
88-
});
89-
9035
it(`should display the Targaryen family once we click on the Targaryen tab`, async () => {
9136
const targaryens = [
9237
'Daenerys Targaryen',

0 commit comments

Comments
 (0)