Skip to content

Commit

Permalink
test(material/bottom-sheet): refactor variable type to const in botto…
Browse files Browse the repository at this point in the history
…m-sheet component unit tests (angular#22895)

style(material/bottom-sheet): fix tslint max-line-length exceeds issue in ci build
  • Loading branch information
nitinmalave committed Jun 16, 2021
1 parent 766b07e commit b57b686
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/material/bottom-sheet/bottom-sheet.spec.ts
Expand Up @@ -189,7 +189,7 @@ describe('MatBottomSheet', () => {

viewContainerFixture.detectChanges();

let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
const backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;

backdrop.click();
viewContainerFixture.detectChanges();
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('MatBottomSheet', () => {

viewContainerFixture.detectChanges();

let overlayPane = overlayContainerElement.querySelector('.cdk-global-overlay-wrapper')!;
const overlayPane = overlayContainerElement.querySelector('.cdk-global-overlay-wrapper')!;

expect(overlayPane.getAttribute('dir')).toBe('rtl');
});
Expand Down Expand Up @@ -320,7 +320,7 @@ describe('MatBottomSheet', () => {
}));

it('should open a new bottom sheet after dismissing a previous sheet', fakeAsync(() => {
let config: MatBottomSheetConfig = {viewContainerRef: testViewContainerRef};
const config: MatBottomSheetConfig = {viewContainerRef: testViewContainerRef};
let bottomSheetRef: MatBottomSheetRef<any> = bottomSheet.open(PizzaMsg, config);

viewContainerFixture.detectChanges();
Expand Down Expand Up @@ -495,7 +495,8 @@ describe('MatBottomSheet', () => {

viewContainerFixture.detectChanges();

let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
const backdrop =
overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
backdrop.click();
viewContainerFixture.detectChanges();
flush();
Expand All @@ -518,14 +519,15 @@ describe('MatBottomSheet', () => {
}));

it('should allow for the disableClose option to be updated while open', fakeAsync(() => {
let bottomSheetRef = bottomSheet.open(PizzaMsg, {
const bottomSheetRef = bottomSheet.open(PizzaMsg, {
disableClose: true,
viewContainerRef: testViewContainerRef
});

viewContainerFixture.detectChanges();

let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
const backdrop =
overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
backdrop.click();

expect(overlayContainerElement.querySelector('mat-bottom-sheet-container')).toBeTruthy();
Expand Down

0 comments on commit b57b686

Please sign in to comment.