@@ -99,12 +99,12 @@ describe('MatDatepicker', () => {
9999 testComponent . touch = true ;
100100 fixture . detectChanges ( ) ;
101101
102- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) ) . toBeNull ( ) ;
102+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) ) . toBeNull ( ) ;
103103
104104 testComponent . datepicker . open ( ) ;
105105 fixture . detectChanges ( ) ;
106106
107- expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container ' ) )
107+ expect ( document . querySelector ( '.mat-datepicker-dialog' ) )
108108 . not . toBeNull ( ) ;
109109 } ) ;
110110
@@ -149,13 +149,13 @@ describe('MatDatepicker', () => {
149149 fixture . detectChanges ( ) ;
150150
151151 expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
152- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
152+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
153153
154154 testComponent . datepicker . open ( ) ;
155155 fixture . detectChanges ( ) ;
156156
157157 expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
158- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
158+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
159159 } ) ;
160160
161161 it ( 'disabled datepicker input should open the calendar if datepicker is enabled' , ( ) => {
@@ -218,13 +218,14 @@ describe('MatDatepicker', () => {
218218 testComponent . datepicker . open ( ) ;
219219 fixture . detectChanges ( ) ;
220220
221- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
221+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
222222
223223 testComponent . datepicker . close ( ) ;
224224 fixture . detectChanges ( ) ;
225225 flush ( ) ;
226+ fixture . detectChanges ( ) ;
226227
227- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
228+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
228229 } ) ) ;
229230
230231 it ( 'setting selected via click should update input and close calendar' , fakeAsync ( ( ) => {
@@ -235,15 +236,15 @@ describe('MatDatepicker', () => {
235236 fixture . detectChanges ( ) ;
236237 flush ( ) ;
237238
238- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
239+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
239240 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
240241
241242 let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
242243 dispatchMouseEvent ( cells [ 1 ] , 'click' ) ;
243244 fixture . detectChanges ( ) ;
244245 flush ( ) ;
245246
246- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
247+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
247248 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
248249 } ) ) ;
249250
@@ -256,7 +257,7 @@ describe('MatDatepicker', () => {
256257 fixture . detectChanges ( ) ;
257258 flush ( ) ;
258259
259- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
260+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
260261 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
261262
262263 let calendarBodyEl = document . querySelector ( '.mat-calendar-body' ) as HTMLElement ;
@@ -268,7 +269,7 @@ describe('MatDatepicker', () => {
268269 fixture . detectChanges ( ) ;
269270 flush ( ) ;
270271
271- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
272+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
272273 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
273274 } ) ) ;
274275
@@ -292,7 +293,7 @@ describe('MatDatepicker', () => {
292293 }
293294
294295 expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 1 ) ;
295- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
296+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
296297 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 2 ) ) ;
297298 } ) ) ;
298299
@@ -313,7 +314,7 @@ describe('MatDatepicker', () => {
313314
314315 fixture . whenStable ( ) . then ( ( ) => {
315316 expect ( selectedChangedSpy . calls . count ( ) ) . toEqual ( 0 ) ;
316- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
317+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
317318 expect ( testComponent . datepickerInput . value ) . toEqual ( new Date ( 2020 , JAN , 1 ) ) ;
318319 } ) ;
319320 } ) ;
@@ -903,13 +904,13 @@ describe('MatDatepicker', () => {
903904 } ) ;
904905
905906 it ( 'should open calendar when toggle clicked' , ( ) => {
906- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
907+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
907908
908909 let toggle = fixture . debugElement . query ( By . css ( 'button' ) ) ;
909910 dispatchMouseEvent ( toggle . nativeElement , 'click' ) ;
910911 fixture . detectChanges ( ) ;
911912
912- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
913+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
913914 } ) ;
914915
915916 it ( 'should not open calendar when toggle clicked if datepicker is disabled' , ( ) => {
@@ -918,12 +919,12 @@ describe('MatDatepicker', () => {
918919 const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
919920
920921 expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
921- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
922+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
922923
923924 dispatchMouseEvent ( toggle , 'click' ) ;
924925 fixture . detectChanges ( ) ;
925926
926- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
927+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
927928 } ) ;
928929
929930 it ( 'should not open calendar when toggle clicked if input is disabled' , ( ) => {
@@ -934,12 +935,12 @@ describe('MatDatepicker', () => {
934935 const toggle = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
935936
936937 expect ( toggle . hasAttribute ( 'disabled' ) ) . toBe ( true ) ;
937- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
938+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
938939
939940 dispatchMouseEvent ( toggle , 'click' ) ;
940941 fixture . detectChanges ( ) ;
941942
942- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . toBeNull ( ) ;
943+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . toBeNull ( ) ;
943944 } ) ;
944945
945946 it ( 'should set the `button` type on the trigger to prevent form submissions' , ( ) => {
@@ -1263,7 +1264,7 @@ describe('MatDatepicker', () => {
12631264 testComponent . datepicker . open ( ) ;
12641265 fixture . detectChanges ( ) ;
12651266
1266- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1267+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
12671268
12681269 let cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
12691270 expect ( cells [ 0 ] . classList ) . toContain ( 'mat-calendar-body-disabled' ) ;
@@ -1335,7 +1336,7 @@ describe('MatDatepicker', () => {
13351336 testComponent . datepicker . open ( ) ;
13361337 fixture . detectChanges ( ) ;
13371338
1338- expect ( document . querySelector ( 'mat-dialog-container ' ) ) . not . toBeNull ( ) ;
1339+ expect ( document . querySelector ( '. mat-datepicker-dialog ' ) ) . not . toBeNull ( ) ;
13391340
13401341 const cells = document . querySelectorAll ( '.mat-calendar-body-cell' ) ;
13411342 dispatchMouseEvent ( cells [ 0 ] , 'click' ) ;
0 commit comments