@@ -99,12 +99,12 @@ describe('MatDatepicker', () => {
99
99
testComponent . touch = true ;
100
100
fixture . detectChanges ( ) ;
101
101
102
- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) ) . toBeNull ( ) ;
102
+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) ) . toBeNull ( ) ;
103
103
104
104
testComponent . datepicker . open ( ) ;
105
105
fixture . detectChanges ( ) ;
106
106
107
- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) )
107
+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) )
108
108
. not . toBeNull ( ) ;
109
109
} ) ;
110
110
@@ -149,13 +149,13 @@ describe('MatDatepicker', () => {
149
149
fixture . detectChanges ( ) ;
150
150
151
151
expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
152
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
152
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
153
153
154
154
testComponent . datepicker . open ( ) ;
155
155
fixture . detectChanges ( ) ;
156
156
157
157
expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
158
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
158
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
159
159
} ) ;
160
160
161
161
it ( 'disabled datepicker input should open the calendar if datepicker is enabled' , ( ) => {
@@ -217,13 +217,13 @@ describe('MatDatepicker', () => {
217
217
testComponent . datepicker . open ( ) ;
218
218
fixture . detectChanges ( ) ;
219
219
220
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
220
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
221
221
222
222
testComponent . datepicker . close ( ) ;
223
223
fixture . detectChanges ( ) ;
224
224
flush ( ) ;
225
225
226
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
226
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
227
227
} ) ) ;
228
228
229
229
it ( 'setting selected via click should update input and close calendar' , fakeAsync ( ( ) => {
@@ -234,15 +234,15 @@ describe('MatDatepicker', () => {
234
234
fixture . detectChanges ( ) ;
235
235
flush ( ) ;
236
236
237
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
237
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
238
238
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
239
239
240
240
let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
241
241
dispatchMouseEvent ( cells [ 1 ] , 'click' ) ;
242
242
fixture . detectChanges ( ) ;
243
243
flush ( ) ;
244
244
245
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
245
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
246
246
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
247
247
} ) ) ;
248
248
@@ -255,7 +255,7 @@ describe('MatDatepicker', () => {
255
255
fixture . detectChanges ( ) ;
256
256
flush ( ) ;
257
257
258
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
258
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
259
259
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
260
260
261
261
let calendarBodyEl = document . querySelector ( '.mat-calendar-body' ) as HTMLElement ;
@@ -267,7 +267,7 @@ describe('MatDatepicker', () => {
267
267
fixture . detectChanges ( ) ;
268
268
flush ( ) ;
269
269
270
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
270
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
271
271
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
272
272
} ) ) ;
273
273
@@ -291,7 +291,7 @@ describe('MatDatepicker', () => {
291
291
}
292
292
293
293
expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 1 ) ;
294
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
294
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
295
295
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
296
296
} ) ) ;
297
297
@@ -312,7 +312,7 @@ describe('MatDatepicker', () => {
312
312
313
313
fixture . whenStable ( ) . then ( ( ) => {
314
314
expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 0 ) ;
315
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
315
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
316
316
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
317
317
} ) ;
318
318
} ) ;
@@ -902,13 +902,13 @@ describe('MatDatepicker', () => {
902
902
} ) ;
903
903
904
904
it ( 'should open calendar when toggle clicked' , ( ) => {
905
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
905
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
906
906
907
907
let toggle = fixture . debugElement . query ( By . css ( 'button' ) ) ;
908
908
dispatchMouseEvent ( toggle . nativeElement , 'click' ) ;
909
909
fixture . detectChanges ( ) ;
910
910
911
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
911
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
912
912
} ) ;
913
913
914
914
it ( 'should not open calendar when toggle clicked if datepicker is disabled' , ( ) => {
@@ -917,12 +917,12 @@ describe('MatDatepicker', () => {
917
917
const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
918
918
919
919
expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
920
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
920
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
921
921
922
922
dispatchMouseEvent ( toggle , 'click' ) ;
923
923
fixture . detectChanges ( ) ;
924
924
925
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
925
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
926
926
} ) ;
927
927
928
928
it ( 'should not open calendar when toggle clicked if input is disabled' , ( ) => {
@@ -933,12 +933,12 @@ describe('MatDatepicker', () => {
933
933
const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
934
934
935
935
expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
936
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
936
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
937
937
938
938
dispatchMouseEvent ( toggle , 'click' ) ;
939
939
fixture . detectChanges ( ) ;
940
940
941
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
941
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
942
942
} ) ;
943
943
944
944
it ( 'should set the `button` type on the trigger to prevent form submissions' , ( ) => {
@@ -1232,7 +1232,7 @@ describe('MatDatepicker', () => {
1232
1232
testComponent . datepicker . open ( ) ;
1233
1233
fixture . detectChanges ( ) ;
1234
1234
1235
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1235
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
1236
1236
1237
1237
let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
1238
1238
expect ( cells [ 0 ] . classList ) . toContain ( 'mat-calendar-body-disabled' ) ;
@@ -1304,7 +1304,7 @@ describe('MatDatepicker', () => {
1304
1304
testComponent . datepicker . open ( ) ;
1305
1305
fixture . detectChanges ( ) ;
1306
1306
1307
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1307
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
1308
1308
1309
1309
const cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
1310
1310
dispatchMouseEvent ( cells [ 0 ] , 'click' ) ;
0 commit comments