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
## 📝 Description
- Bumped the CI image to Alpine 3.20+, updated wallaby to comply with
the new ChromeDriver version
- Hardened our Wallaby helpers to handle DOM refreshes/retries, then
applied them across the suite (flash assertions, modal submits, Okta
setup, artifacts policies, etc.) so the worst flakes are gone
- Stabilized the stubborn cases (self‑hosted agents page, artifacts
retention editor, Okta integration flows) by waiting on the right UI
hooks instead of the old modal DOM
## ✅ Checklist
- [x] I have tested this change
- [ ] This change requires documentation update
Copy file name to clipboardExpand all lines: front/AGENTS.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,18 @@
24
24
## Testing Guidelines
25
25
- Keep unit tests close to their modules and name `describe` blocks after the function under test.
26
26
- Wallaby browser specs need the Docker stack running; execute with `mix test test/browser`.
27
+
- Prefer the helpers in `Support.Browser`/`Support.Browser.Assertions` (`assert_stable/2`, `assert_flash_notice/2`, etc.) instead of calling `assert_text/2` or `assert_has/2` directly—these wrappers handle stale DOM retries and should be the default in new tests.
28
+
- When a flow depends on flashes or full-page redirects, assert against deterministic selectors (e.g., `#changes-notification p[data-test=...]`) rather than generic text nodes, and wait for the new page before chaining more actions.
29
+
- Seed every browser test with the features and permissions it needs (usually via `Support.Stubs.Feature.enable_feature/3` and `Support.Stubs.PermissionPatrol.allow_everything/2`) so the UI renders the buttons you intend to click.
30
+
- Keep destructive test fixtures scoped: create orgs/projects/users per test module using the stubs in `test/support/stubs`, and add explicit waits if a change propagates asynchronously (e.g., retention policies or self-hosted agents).
27
31
- Generate coverage with `mix coveralls.html` and `npm run coverage`.
28
32
- Update fixtures in `test/fixture` when workflow, API, or UI contracts change.
29
33
34
+
## Browser Testing Notes
35
+
- Use the `browser_test` macro from `FrontWeb.WallabyCase` for every Wallaby spec. It handles screenshot capture, session cleanup, and tags so failures are easier to debug.
36
+
- Chrome/Chromedriver now refuse to click invisible elements; always wait until the target button/link is visible (`assert_stable/2`, `assert_stable_text/2`) before clicking, and prefer selectors that match the final rendered node (not a parent wrapper).
37
+
- For modals, redirects, and flash messages, re-sync the page via `Support.Browser.assert_flash_notice/2` or another deterministic element to avoid stale references after navigation.
0 commit comments