@@ -606,7 +606,7 @@ describe('MDC-based MatMenu', () => {
606
606
const panel = overlayContainerElement . querySelector ( '.mat-mdc-menu-panel' ) ! ;
607
607
608
608
expect ( panel . classList ) . toContain ( 'custom-one' ) ;
609
- expect ( panel . classList ) . toContain ( 'mat-elevation-z8 ' ) ;
609
+ expect ( panel . classList ) . toContain ( 'mat-elevation-z2 ' ) ;
610
610
611
611
fixture . componentInstance . panelClass = 'custom-two' ;
612
612
fixture . detectChanges ( ) ;
@@ -615,8 +615,8 @@ describe('MDC-based MatMenu', () => {
615
615
expect ( panel . classList ) . toContain ( 'custom-two' ) ;
616
616
expect ( panel . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
617
617
expect ( panel . classList )
618
- . withContext ( 'Expected mat-elevation-z8 not to be removed' )
619
- . toContain ( 'mat-elevation-z8 ' ) ;
618
+ . withContext ( 'Expected mat-elevation-z2 not to be removed' )
619
+ . toContain ( 'mat-elevation-z2 ' ) ;
620
620
} ) ) ;
621
621
622
622
it ( 'should set the "menu" role on the overlay panel' , fakeAsync ( ( ) => {
@@ -2369,17 +2369,17 @@ describe('MDC-based MatMenu', () => {
2369
2369
expect ( menus [ 0 ] . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
2370
2370
expect ( menus [ 0 ] . classList )
2371
2371
. withContext ( 'Expected root menu to have base elevation.' )
2372
- . toContain ( 'mat-elevation-z8 ' ) ;
2372
+ . toContain ( 'mat-elevation-z2 ' ) ;
2373
2373
2374
2374
expect ( menus [ 1 ] . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
2375
2375
expect ( menus [ 1 ] . classList )
2376
2376
. withContext ( 'Expected first sub-menu to have base elevation + 1.' )
2377
- . toContain ( 'mat-elevation-z9 ' ) ;
2377
+ . toContain ( 'mat-elevation-z3 ' ) ;
2378
2378
2379
2379
expect ( menus [ 2 ] . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
2380
2380
expect ( menus [ 2 ] . classList )
2381
2381
. withContext ( 'Expected second sub-menu to have base elevation + 2.' )
2382
- . toContain ( 'mat-elevation-z10 ' ) ;
2382
+ . toContain ( 'mat-elevation-z4 ' ) ;
2383
2383
} ) ) ;
2384
2384
2385
2385
it ( 'should update the elevation when the same menu is opened at a different depth' , fakeAsync ( ( ) => {
@@ -2398,7 +2398,7 @@ describe('MDC-based MatMenu', () => {
2398
2398
expect ( lastMenu . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
2399
2399
expect ( lastMenu . classList )
2400
2400
. withContext ( 'Expected menu to have the base elevation plus two.' )
2401
- . toContain ( 'mat-elevation-z10 ' ) ;
2401
+ . toContain ( 'mat-elevation-z4 ' ) ;
2402
2402
2403
2403
( overlay . querySelector ( '.cdk-overlay-backdrop' ) ! as HTMLElement ) . click ( ) ;
2404
2404
fixture . detectChanges ( ) ;
@@ -2417,10 +2417,10 @@ describe('MDC-based MatMenu', () => {
2417
2417
expect ( lastMenu . classList ) . toContain ( 'mat-mdc-elevation-specific' ) ;
2418
2418
expect ( lastMenu . classList )
2419
2419
. not . withContext ( 'Expected menu not to maintain old elevation.' )
2420
- . toContain ( 'mat-elevation-z10 ' ) ;
2420
+ . toContain ( 'mat-elevation-z4 ' ) ;
2421
2421
expect ( lastMenu . classList )
2422
2422
. withContext ( 'Expected menu to have the proper updated elevation.' )
2423
- . toContain ( 'mat-elevation-z8 ' ) ;
2423
+ . toContain ( 'mat-elevation-z2 ' ) ;
2424
2424
} ) ) ;
2425
2425
2426
2426
it ( 'should not change focus origin if origin not specified for trigger' , fakeAsync ( ( ) => {
@@ -2461,7 +2461,7 @@ describe('MDC-based MatMenu', () => {
2461
2461
expect ( menuClasses )
2462
2462
. withContext ( 'Expected user elevation to be maintained' )
2463
2463
. toContain ( 'mat-elevation-z24' ) ;
2464
- expect ( menuClasses ) . not . toContain ( 'mat-elevation-z8 ' , 'Expected no stacked elevation.' ) ;
2464
+ expect ( menuClasses ) . not . toContain ( 'mat-elevation-z2 ' , 'Expected no stacked elevation.' ) ;
2465
2465
} ) ) ;
2466
2466
2467
2467
it ( 'should close all of the menus when the root is closed programmatically' , fakeAsync ( ( ) => {
@@ -2762,7 +2762,7 @@ const SIMPLE_MENU_TEMPLATE = `
2762
2762
<button mat-menu-item>
2763
2763
<span>Item with text inside span</span>
2764
2764
</button>
2765
- @for (item of extraItems; track item ) {
2765
+ @for (item of extraItems; track $index ) {
2766
2766
<button mat-menu-item> {{item}} </button>
2767
2767
}
2768
2768
</mat-menu>
@@ -2949,7 +2949,7 @@ class NestedMenuCustomElevation {
2949
2949
template : `
2950
2950
<button [matMenuTriggerFor]="root" #rootTriggerEl>Toggle menu</button>
2951
2951
<mat-menu #root="matMenu">
2952
- @for (item of items; track item ) {
2952
+ @for (item of items; track $index ) {
2953
2953
<button
2954
2954
mat-menu-item
2955
2955
class="level-one-trigger"
@@ -3071,7 +3071,7 @@ class MenuWithCheckboxItems {
3071
3071
template : `
3072
3072
<button [matMenuTriggerFor]="menu">Toggle menu</button>
3073
3073
<mat-menu #menu="matMenu">
3074
- @for (item of items; track item ) {
3074
+ @for (item of items; track $index ) {
3075
3075
<button [disabled]="item.disabled"mat-menu-item>{{item.label}}</button>
3076
3076
}
3077
3077
</mat-menu>
@@ -3092,7 +3092,7 @@ class SimpleMenuWithRepeater {
3092
3092
<button [matMenuTriggerFor]="menu">Toggle menu</button>
3093
3093
<mat-menu #menu="matMenu">
3094
3094
<ng-template matMenuContent>
3095
- @for (item of items; track item ) {
3095
+ @for (item of items; track $index ) {
3096
3096
<button [disabled]="item.disabled" mat-menu-item>{{item.label}}</button>
3097
3097
}
3098
3098
</ng-template>
0 commit comments