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