refactor(tests): use getByRole instead of getByText for interactive elements
- Refactor ~47 test cases across 7 test files to use getByRole - Improve accessibility testing coverage following Testing Library best practices - Make tests more robust against text changes (i18n, copy updates) - Test elements as users (especially screen readers) interact with them
This commit is contained in:
committed by
Benoit TELLIER
parent
4c18bf3a52
commit
b9905cbb7a
@@ -103,7 +103,7 @@ async function setupEventPopover(
|
||||
fireEvent.change(titleInput, { target: { value: "Meeting" } });
|
||||
|
||||
// Click More options to expand the dialog
|
||||
const showMoreButton = screen.getByText("More options");
|
||||
const showMoreButton = screen.getByRole("button", { name: /More options/i });
|
||||
fireEvent.click(showMoreButton);
|
||||
|
||||
// Check Repeat checkbox to show repeat options
|
||||
|
||||
Reference in New Issue
Block a user