You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: stabilize and rewrite anvil-cmg filter e2e suite (#4800) (#4801)
* test: stabilize and rewrite anvil-cmg filter e2e suite (#4800)
rewrites e2e/anvil/anvil-filters.spec.ts in the style of the anvil-catalog
filter spec to fix a flaky biosamples chip-click test and reduce overall
flake surface.
key changes:
- replaced positional/text-based locators with test-id locators
(filter-popover, filter-item, filter-term, filter-count, table-first-cell,
clear-all-filters, filters)
- extracted shared filter helpers to e2e/features/common/filters.ts so both
anvil-cmg and anvil-catalog specs use the same primitives; generic helpers
to e2e/features/common/utils.ts (escapeRegExp)
- option clicks via dispatchevent (matches existing sidebar-button pattern,
avoids webkit click swallowing)
- popover assertions re-locate by name across facets (filter list re-sorts
when count changes); within a single facet popover, positional locators
are kept since the list does not reorder on selection
- filter tag chips matched via mui-chip-root scoped to the filters
container, replacing brittle #sidebar-positioner text lookups
- consolidated 10 per-entity filter-presence/open tests into 2 (files +
donors representatives) covering both strict-list match and per-filter
open/close
cleanup:
- removed testfilterpersistence, testfiltercounts, testfiltertags,
testclearall, testfilterpresence and their now-orphaned helpers from
e2e/testFunctions.ts
- demoted getmthrowncthcolumncelllocator and getfirstrownthcolumncelllocator
from export to internal const
- removed unused anvil_files_selectable_columns_by_name from
e2e/anvil/constants.ts
Closes#4800
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: use dispatchevent for popover item clicks (#4800)
per copilot review on #4801: the multi-select and count tests still
used regular click() on popover items, which can be swallowed by the
popover overlay on webkit (the same failure mode the selectFirstOption
helper guards against). switch both to dispatchevent("click") for
consistency.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Fran McDade <18710366+frano-m@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments