diff --git a/src/components/TextInputWithValidation/index.tsx b/src/components/TextInputWithValidation/index.tsx index 7793c76242..2984b9d247 100644 --- a/src/components/TextInputWithValidation/index.tsx +++ b/src/components/TextInputWithValidation/index.tsx @@ -81,7 +81,11 @@ const TextInputWithValidation: React.FC = ) : ( - + {validatorErrorMessage} ) diff --git a/src/components/TupleSelect/TupleSelect.test.tsx b/src/components/TupleSelect/TupleSelect.test.tsx index 21d6731855..172ed3cf8f 100644 --- a/src/components/TupleSelect/TupleSelect.test.tsx +++ b/src/components/TupleSelect/TupleSelect.test.tsx @@ -78,8 +78,8 @@ describe("tupleSelect", () => { expect(input).toHaveValue("bad"); expect(onSubmit).not.toHaveBeenCalled(); expect(validator).toHaveBeenLastCalledWith("bad"); - expect(screen.getByDataCy("tuple-select-warning")).toBeInTheDocument(); - await user.hover(screen.queryByDataCy("tuple-select-warning")); + expect(screen.getByLabelText("validation error")).toBeInTheDocument(); + await user.hover(screen.getByLabelText("validation error")); await screen.findByText(validatorErrorMessage); }); }); diff --git a/src/components/TupleSelectWithRegexConditional/TupleSelectWithRegexConditional.test.tsx b/src/components/TupleSelectWithRegexConditional/TupleSelectWithRegexConditional.test.tsx index ff8a23f7bb..0a13a8821b 100644 --- a/src/components/TupleSelectWithRegexConditional/TupleSelectWithRegexConditional.test.tsx +++ b/src/components/TupleSelectWithRegexConditional/TupleSelectWithRegexConditional.test.tsx @@ -77,8 +77,8 @@ describe("tupleSelectWithRegexConditional", () => { expect(input).toHaveValue("bad"); expect(onSubmit).not.toHaveBeenCalled(); expect(validator).toHaveBeenLastCalledWith("bad"); - expect(screen.getByDataCy("tuple-select-warning")).toBeInTheDocument(); - await user.hover(screen.queryByDataCy("tuple-select-warning")); + expect(screen.getByLabelText("validation error")).toBeInTheDocument(); + await user.hover(screen.getByLabelText("validation error")); await waitFor(() => { expect(screen.getByText(validatorErrorMessage)).toBeInTheDocument(); });