@@ -106,12 +106,12 @@ describe('MatDatepicker', () => {
106
106
testComponent . touch = true ;
107
107
fixture . detectChanges ( ) ;
108
108
109
- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) ) . toBeNull ( ) ;
109
+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) ) . toBeNull ( ) ;
110
110
111
111
testComponent . datepicker . open ( ) ;
112
112
fixture . detectChanges ( ) ;
113
113
114
- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) )
114
+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) )
115
115
. not . toBeNull ( ) ;
116
116
} ) ;
117
117
@@ -156,13 +156,13 @@ describe('MatDatepicker', () => {
156
156
fixture . detectChanges ( ) ;
157
157
158
158
expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
159
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
159
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
160
160
161
161
testComponent . datepicker . open ( ) ;
162
162
fixture . detectChanges ( ) ;
163
163
164
164
expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
165
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
165
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
166
166
} ) ;
167
167
168
168
it ( 'disabled datepicker input should open the calendar if datepicker is enabled' , ( ) => {
@@ -224,13 +224,13 @@ describe('MatDatepicker', () => {
224
224
testComponent . datepicker . open ( ) ;
225
225
fixture . detectChanges ( ) ;
226
226
227
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
227
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
228
228
229
229
testComponent . datepicker . close ( ) ;
230
230
fixture . detectChanges ( ) ;
231
231
flush ( ) ;
232
232
233
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
233
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
234
234
} ) ) ;
235
235
236
236
it ( 'setting selected via click should update input and close calendar' , fakeAsync ( ( ) => {
@@ -241,15 +241,15 @@ describe('MatDatepicker', () => {
241
241
fixture . detectChanges ( ) ;
242
242
flush ( ) ;
243
243
244
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
244
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
245
245
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
246
246
247
247
let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
248
248
dispatchMouseEvent ( cells [ 1 ] , 'click' ) ;
249
249
fixture . detectChanges ( ) ;
250
250
flush ( ) ;
251
251
252
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
252
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
253
253
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
254
254
} ) ) ;
255
255
@@ -262,7 +262,7 @@ describe('MatDatepicker', () => {
262
262
fixture . detectChanges ( ) ;
263
263
flush ( ) ;
264
264
265
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
265
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
266
266
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
267
267
268
268
let calendarBodyEl = document . querySelector ( '.mat-calendar-body' ) as HTMLElement ;
@@ -274,7 +274,7 @@ describe('MatDatepicker', () => {
274
274
fixture . detectChanges ( ) ;
275
275
flush ( ) ;
276
276
277
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
277
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
278
278
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
279
279
} ) ) ;
280
280
@@ -298,7 +298,7 @@ describe('MatDatepicker', () => {
298
298
}
299
299
300
300
expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 1 ) ;
301
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
301
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
302
302
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
303
303
} ) ) ;
304
304
@@ -319,7 +319,7 @@ describe('MatDatepicker', () => {
319
319
320
320
fixture . whenStable ( ) . then ( ( ) => {
321
321
expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 0 ) ;
322
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
322
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
323
323
expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
324
324
} ) ;
325
325
} ) ;
@@ -909,13 +909,13 @@ describe('MatDatepicker', () => {
909
909
} ) ;
910
910
911
911
it ( 'should open calendar when toggle clicked' , ( ) => {
912
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
912
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
913
913
914
914
let toggle = fixture . debugElement . query ( By . css ( 'button' ) ) ;
915
915
dispatchMouseEvent ( toggle . nativeElement , 'click' ) ;
916
916
fixture . detectChanges ( ) ;
917
917
918
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
918
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
919
919
} ) ;
920
920
921
921
it ( 'should not open calendar when toggle clicked if datepicker is disabled' , ( ) => {
@@ -924,12 +924,12 @@ describe('MatDatepicker', () => {
924
924
const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
925
925
926
926
expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
927
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
927
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
928
928
929
929
dispatchMouseEvent ( toggle , 'click' ) ;
930
930
fixture . detectChanges ( ) ;
931
931
932
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
932
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
933
933
} ) ;
934
934
935
935
it ( 'should not open calendar when toggle clicked if input is disabled' , ( ) => {
@@ -940,12 +940,12 @@ describe('MatDatepicker', () => {
940
940
const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
941
941
942
942
expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
943
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
943
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
944
944
945
945
dispatchMouseEvent ( toggle , 'click' ) ;
946
946
fixture . detectChanges ( ) ;
947
947
948
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
948
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
949
949
} ) ;
950
950
951
951
it ( 'should set the `button` type on the trigger to prevent form submissions' , ( ) => {
@@ -1224,7 +1224,7 @@ describe('MatDatepicker', () => {
1224
1224
testComponent . datepicker . open ( ) ;
1225
1225
fixture . detectChanges ( ) ;
1226
1226
1227
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1227
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
1228
1228
1229
1229
let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
1230
1230
expect ( cells [ 0 ] . classList ) . toContain ( 'mat-calendar-body-disabled' ) ;
@@ -1296,7 +1296,7 @@ describe('MatDatepicker', () => {
1296
1296
testComponent . datepicker . open ( ) ;
1297
1297
fixture . detectChanges ( ) ;
1298
1298
1299
- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1299
+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
1300
1300
1301
1301
const cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
1302
1302
dispatchMouseEvent ( cells [ 0 ] , 'click' ) ;
0 commit comments