Skip to content

Commit 924bd55

Browse files
committed
Update DatePicker.testutils.tsx
1 parent d4bbc4e commit 924bd55

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/date-picker/src/DatePicker/DatePicker.testutils.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,14 @@ export const renderDatePicker = (
114114
const calendarGrid = withinElement(menuContainerEl)?.queryByRole('grid');
115115
const calendarCells =
116116
withinElement(menuContainerEl)?.getAllByRole('gridcell');
117-
const leftChevron =
118-
withinElement(menuContainerEl)?.queryByLabelText('Previous month') ||
119-
withinElement(menuContainerEl)?.queryByLabelText('Previous valid month');
120-
const rightChevron =
121-
withinElement(menuContainerEl)?.queryByLabelText('Next month') ||
122-
withinElement(menuContainerEl)?.queryByLabelText('Next valid month');
117+
118+
// TODO: date-picker test harnesses https://jira.mongodb.org/browse/LG-4176
119+
const leftChevron = withinElement(menuContainerEl)?.queryByTestId(
120+
'lg-date_picker-menu-prev_month_button',
121+
);
122+
const rightChevron = withinElement(menuContainerEl)?.queryByTestId(
123+
'lg-date_picker-menu-next_month_button',
124+
);
123125
const monthSelect = withinElement(menuContainerEl)?.queryByLabelText(
124126
'Select month',
125127
{

0 commit comments

Comments
 (0)