Fixed unit test failing

This commit is contained in:
Vito Albano
2023-12-04 17:06:14 +00:00
parent 4dfcd7bff1
commit 7e4604ef41
2 changed files with 4 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
display: block;
margin: 0;
}
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */
.mdc-tab__text-label {
min-width: 0;
@@ -41,8 +41,7 @@
& .mat-tab-body-content > *:last-child {
margin-bottom: 0;
}
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */
/* TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version. */
.mdc-tab__text-label {
flex-grow: 1;

View File

@@ -142,7 +142,7 @@ describe('Custom InfoDrawer', () => {
fixture.detectChanges();
const tab: any = fixture.debugElement.queryAll(By.css('.mdc-tab--active .mdc-tab__text-label'));
expect(tab.length).toBe(1);
expect(tab[0].nativeElement.innerText).toContain('Tab1');
expect(tab[0].nativeElement.innerText).toContain('TAB1');
});
it('should select the tab 2 (index 1)', () => {
@@ -150,7 +150,7 @@ describe('Custom InfoDrawer', () => {
fixture.detectChanges();
const tab: any = fixture.debugElement.queryAll(By.css('.mdc-tab--active .mdc-tab__text-label'));
expect(tab.length).toBe(1);
expect(tab[0].nativeElement.innerText).toContain('Tab2');
expect(tab[0].nativeElement.innerText).toContain('TAB2');
});
it('should render a tab with icon', () => {