@@ -111,7 +111,7 @@ describe('BpkCalendarContainer', () => {
111
111
112
112
// dates in March are outside current month
113
113
const outsideDate = screen . getByRole ( 'button' , {
114
- name : / 1 s t M a r c h 2 0 1 0 / i,
114
+ name : / M o n d a y , 1 s t M a r c h / i,
115
115
} ) ;
116
116
waitFor ( ( ) =>
117
117
expect ( outsideDate . classList . contains ( 'bpk-calendar-date--outside' ) ) . toBe (
@@ -125,7 +125,7 @@ describe('BpkCalendarContainer', () => {
125
125
126
126
// dates in March are within current month
127
127
const currentDate = screen . getByRole ( 'button' , {
128
- name : / 1 s t M a r c h 2 0 1 0 / i,
128
+ name : / M o n d a y , 1 s t M a r c h / i,
129
129
} ) ;
130
130
waitFor ( ( ) =>
131
131
expect ( currentDate . classList . contains ( 'bpk-calendar-date--outside' ) ) . toBe (
@@ -300,20 +300,20 @@ describe('BpkCalendarContainer', () => {
300
300
301
301
await fireEvent . keyDown ( getDate ( originStr ) , { key : 'ArrowRight' } ) ;
302
302
expect (
303
- getDate ( / 2 n d M a r c h / ) . classList . contains ( 'bpk-calendar-date--focused' ) ,
303
+ getDate ( / T u e s d a y , 2 n d M a r c h / ) . classList . contains ( 'bpk-calendar-date--focused' ) ,
304
304
) . toBe ( true ) ;
305
305
306
- await fireEvent . keyDown ( getDate ( / 2 n d M a r c h / i) , { key : 'ArrowDown' } ) ;
306
+ await fireEvent . keyDown ( getDate ( / T u e s d a y , 2 n d M a r c h / i) , { key : 'ArrowDown' } ) ;
307
307
expect (
308
- getDate ( / 9 t h M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
308
+ getDate ( / T u e s d a y , 9 t h M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
309
309
) . toBe ( true ) ;
310
310
311
- await fireEvent . keyDown ( getDate ( / 9 t h M a r c h / i) , { key : 'ArrowLeft' } ) ;
311
+ await fireEvent . keyDown ( getDate ( / T u e s d a y , 9 t h M a r c h / i) , { key : 'ArrowLeft' } ) ;
312
312
expect (
313
- getDate ( / 8 t h M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
313
+ getDate ( / M o n d a y , 8 t h M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
314
314
) . toBe ( true ) ;
315
315
316
- await fireEvent . keyDown ( getDate ( / 8 t h M a r c h / i) , { key : 'ArrowUp' } ) ;
316
+ await fireEvent . keyDown ( getDate ( / M o n d a y , 8 t h M a r c h / i) , { key : 'ArrowUp' } ) ;
317
317
expect (
318
318
getDate ( originStr ) . classList . contains ( 'bpk-calendar-date--focused' ) ,
319
319
) . toBe ( true ) ;
@@ -378,7 +378,7 @@ describe('BpkCalendarContainer', () => {
378
378
379
379
await fireEvent . keyDown ( getDate ( / 2 8 t h F e b r u a r y / i) , { key : 'ArrowRight' } ) ;
380
380
expect (
381
- getDate ( / 1 s t M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
381
+ getDate ( / M o n d a y , 1 s t M a r c h / i) . classList . contains ( 'bpk-calendar-date--focused' ) ,
382
382
) . toBe ( true ) ;
383
383
expect ( onMonthChange . mock . calls . length ) . toEqual ( 1 ) ;
384
384
expect ( onMonthChange . mock . calls [ 0 ] [ 1 ] ) . toEqual ( {
0 commit comments