Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(datetimeinput): correct time-input label query in invalid-input tests (#3445)

Cindy Zhang792c68ebd653
diff --git a/packages/core/src/DateTimeInput/DateTimeInput.test.tsx b/packages/core/src/DateTimeInput/DateTimeInput.test.tsx
index 80dceca942..cbc36976b0 100644
--- a/packages/core/src/DateTimeInput/DateTimeInput.test.tsx
+++ b/packages/core/src/DateTimeInput/DateTimeInput.test.tsx
@@ -486,7 +486,7 @@ describe('DateTimeInput', () => {
/>,
);
- const timeInput = screen.getByLabelText('Time');
+ const timeInput = screen.getByLabelText('Meeting time');
fireEvent.change(timeInput, {target: {value: '99:99 zz'}});
expect(timeInput).toHaveAttribute('aria-invalid', 'true');
@@ -501,7 +501,7 @@ describe('DateTimeInput', () => {
/>,
);
- const timeInput = screen.getByLabelText('Time');
+ const timeInput = screen.getByLabelText('Meeting time');
fireEvent.change(timeInput, {target: {value: '3:45 pm'}});
expect(timeInput).not.toHaveAttribute('aria-invalid');
@@ -516,7 +516,7 @@ describe('DateTimeInput', () => {
/>,
);
- const timeInput = screen.getByLabelText('Time');
+ const timeInput = screen.getByLabelText('Meeting time');
fireEvent.change(timeInput, {target: {value: '99:99 zz'}});
expect(screen.getByText('Invalid time')).toBeInTheDocument();