Description
The e2e test Check that deselecting filters through the "Search all Filters" textbox works correctly on the Workspaces tab is flaky.
Test file: e2e/anvil-catalog/anvilcatalog-filters.spec.ts:66
Helper: e2e/testFunctions.ts:797 (testDeselectFiltersThroughSearchBar)
Failure
The test expects a checkbox to be checked after selecting a filter, but the checkbox is still unchecked when the assertion runs. This suggests a race condition — the filter selection hasn't completed before the assertion fires.
Error: expect(locator).toBeChecked() failed
Locator: getByRole('button').filter({ hasText: /^Consortia Access Only\s*\d+\s*/ })
.filter({ has: getByRole('checkbox') }).getByRole('checkbox')
Expected: checked
Received: unchecked
Timeout: 15000ms
The locator resolves 19 times during the timeout but the checkbox remains unchecked, indicating the prior click to check the box may not have registered or completed.
Possible fixes
- Add a
waitFor or stability check after clicking the checkbox before asserting toBeChecked()
- Ensure the filter panel is fully loaded before interacting with checkboxes
- Increase retry/timeout if the filter state update is async
Description
The e2e test
Check that deselecting filters through the "Search all Filters" textbox works correctly on the Workspaces tabis flaky.Test file:
e2e/anvil-catalog/anvilcatalog-filters.spec.ts:66Helper:
e2e/testFunctions.ts:797(testDeselectFiltersThroughSearchBar)Failure
The test expects a checkbox to be checked after selecting a filter, but the checkbox is still unchecked when the assertion runs. This suggests a race condition — the filter selection hasn't completed before the assertion fires.
The locator resolves 19 times during the timeout but the checkbox remains unchecked, indicating the prior click to check the box may not have registered or completed.
Possible fixes
waitForor stability check after clicking the checkbox before assertingtoBeChecked()