From 7e4604ef4135f307c6166ee893bcef2a2f23edb2 Mon Sep 17 00:00:00 2001 From: Vito Albano Date: Mon, 4 Dec 2023 17:06:14 +0000 Subject: [PATCH] Fixed unit test failing --- lib/core/src/lib/info-drawer/info-drawer.component.scss | 5 ++--- lib/core/src/lib/info-drawer/info-drawer.component.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/core/src/lib/info-drawer/info-drawer.component.scss b/lib/core/src/lib/info-drawer/info-drawer.component.scss index 483783f64e..6daa2a2c38 100644 --- a/lib/core/src/lib/info-drawer/info-drawer.component.scss +++ b/lib/core/src/lib/info-drawer/info-drawer.component.scss @@ -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; diff --git a/lib/core/src/lib/info-drawer/info-drawer.component.spec.ts b/lib/core/src/lib/info-drawer/info-drawer.component.spec.ts index e3beeb27a5..0fab3c08b5 100644 --- a/lib/core/src/lib/info-drawer/info-drawer.component.spec.ts +++ b/lib/core/src/lib/info-drawer/info-drawer.component.spec.ts @@ -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', () => {