Skip to content

test(e2e): cover every section and assert real outcomes - #325

Merged
MrYuion merged 1 commit into
developfrom
e2e/coverage-and-assertions
Oct 21, 2026
Merged

MrYuion merged 1 commit into
developfrom
e2e/coverage-and-assertions

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Most e2e tests could not fail. They checked that some element was visible, hid failed assertions behind .catch(() => undefined), or used if (count > 0) guards that skipped them when the mock had no data (domains and triggers have none). Drivers, modules, repositories, triggers, groups and navigation had no e2e tests.

Changes

  • New specs: drivers, modules, repositories, triggers, groups and navigation.
  • Rewritten specs: systems, zones, users, domains, admin, mobile and cascade delete. Tests now check the name, URL or table row, that a create shows in the list, that a delete removes the item, and that an edit stays after page.reload(). No waitForTimeout is left.
  • Shared code: BasePage helpers for the list/detail layout (gotoItem, openTab, createWith, deleteSelected, discardChanges, tableRow, notification), plus FeaturePage and MobilePage in place of five page objects. A fixture switches on mock mode, and seedMockData / seedSession seed mock data.
  • Mock fixes the flows need:
    • a groups backend
    • a default domain, so users can be created and edited
    • stable user ids with first and last names
    • users filtered by domain
    • zone tags as arrays (they showed as single letters)
    • schema, platform and cluster/versions endpoints, whose load errors covered the admin menu after fix(ui): resolve UX audit issues across workflows #324
  • e2e/README.md now describes how to write tests. Adds user-stories/groups.md.

Tests

  • e2e chromium + mobile-chrome: 314/314 with --repeat-each=2
  • e2e webkit + mobile-safari: 157/157
  • Unit tests: 1052 passed. Lint and type checks are clean.
  • Firefox would not start locally (firefox.launch() times out with no tests), so CI runs it for the first time.

App bugs found (not fixed here)

  1. The module Online/Offline label does not change after stop or start. module-state.service.ts sets item.running in place, so the signal does not fire.
  2. A click on a tab that is partly out of view only scrolls the tab bar. A second click is needed.
  3. A user with only name (no last name, e.g. from SSO) cannot be edited, because Last Name is required.
  4. The module form's "A driver is required" message never shows. form.driver is never invalid, because the schema requires driver_id.
  5. An interface repository fetches /<folder>/CHANGELOG.md with plain fetch, which goes through the dev proxy to placeos-dev. The spec stubs it.

Reviewed with sol-loop: 4 rounds with gpt-6.1-sol on high. The last round covered the spec and mock updates for the #324 UI after the rebase (new button names, the "Discard changes?" prompt, inline validation, the missing mock endpoints).

Changes made by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

Most e2e tests could not fail: they checked that some element was
visible, hid failed assertions behind .catch(), or skipped themselves
when mock data was missing. Drivers, modules, repositories, triggers,
groups and navigation had no tests.

- Add specs for drivers, modules, repositories, triggers, groups and
  navigation.
- Rewrite the systems, zones, users, domains, admin, mobile and cascade
  delete specs to check names, URLs, table rows and changes that stay
  after a reload.
- Share helpers in BasePage, FeaturePage and MobilePage. Add a fixture
  that switches on mock mode and seeds mock data.
- Fill mock gaps the flows need: a groups backend, a default domain,
  stable user ids with first and last names, user filters by domain,
  zone tags as arrays, and the schema, platform and cluster versions
  endpoints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
backoffice Ready Ready Preview Oct 21, 2026 6:58am UTC

@MrYuion
MrYuion merged commit cc99e66 into develop Oct 21, 2026
7 checks passed
@MrYuion
MrYuion deleted the e2e/coverage-and-assertions branch October 21, 2026 07:06

This branch was successfully deployed

1 active deployment
Preview — 60ec46d5 Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant