Update e2e tests and mocks for locale-based routing

- Adjusted assertions and navigation tests to include `/en` locale prefix for consistency.
- Updated next-intl and components-i18n mocks to support locale handling in tests.
- Renamed "Components" link and related references to "Design System" in homepage tests.
- Disabled typing delay in debounce test for improved test reliability.
This commit is contained in:
Felipe Cardoso
2025-11-19 01:31:35 +01:00
parent da021d0640
commit 0b192ce030
7 changed files with 38 additions and 22 deletions

View File

@@ -161,14 +161,14 @@ describe('UserListTable', () => {
});
it('calls onSearch after debounce delay', async () => {
const user = userEvent.setup();
const user = userEvent.setup({ delay: null }); // Disable typing delay for debounce test
render(<UserListTable {...defaultProps} />);
const searchInput = screen.getByPlaceholderText('Search by name or email...');
await user.type(searchInput, 'alice');
// Should not call immediately
// Should not call immediately (debounce is 300ms)
expect(defaultProps.onSearch).not.toHaveBeenCalled();
// Should call after debounce (300ms)