Add initial e2e test support - #204
Merged
Merged
Conversation
The E2E specs already lived in the repo but had never run in CI; enabling them exposed four real problems, now fixed: - Decker pages render only on the front end (template_redirect), so the calendar and collaboration specs navigated to wp-admin URLs where the Decker router never runs. Use plain front-end navigation instead. - The task form's due date is required; the front-end save silently no-ops on an invalid form. Fill #task-due-date before saving in the locking spec. - Collaborative editing is off by default and pulls Yjs from an external CDN plus a signalling server, so it is not a deterministic CI gate. Exclude it by default (testIgnore unless DECKER_E2E_COLLAB=1) and add a dedicated `make test-e2e-collab` target that toggles the setting around the run. setup-tests-env now forces collaborative_editing off for the main suite. - The collaboration checkbox test relied on REST persisting custom task meta (it does not); drive it through the real form save instead. Also remove the WordPress-core boilerplate specs (edit-posts, hello) and replace them with Decker-focused coverage: - smoke.spec.js: the front-end app shell boots and sidebar navigation works. - board.spec.js: the Kanban board renders its stack columns and a task created through the real form lands in the TO-DO column. make test-e2e: 12 passed. make test-e2e-collab: 6 passed.
This was referenced Jul 10, 2026
The task-locking and today-quick-action specs log two users in via the wp-login form in separate browser contexts. Under CI timing the previous `networkidle` wait could return before the auth cookie was committed, so a follow-up navigation rendered as a different (or anonymous) user and the server-side edit lock was acquired for the wrong account (the banner showed "locked by admin" instead of the expected user). Wait for the post-login redirect to wp-admin before navigating, and force a clean browser context so no storage state leaks between sessions.
Follow-up to the REST task-meta fix (#273), now merged into this branch: - board.spec.js: add a test that a task created over REST with an explicit stack renders in that column (and not in TO-DO), and refresh the header note that previously claimed REST dropped task meta. - task-collaboration.spec.js: fix the same stale comment on the checkbox test. - ci.yml: remove the commented-out "Pre-pull Docker images" dead block.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the Playwright E2E suite into CI and makes it pass deterministically.
The E2E specs already lived in the repo but had never actually run in CI. Turning them on surfaced four real problems in a clean environment; this PR fixes all of them and adds Decker-focused coverage.
Why the E2E job was failing (root causes)
calendar/task-collaborationtemplate_redirect(home_url('?decker_page=…')). The specs navigated to/wp-admin/?decker_page=…, where the Decker router never runs, so they got the dashboard. Fixed by using plain front-endpage.goto().task-locking#task-due-dateis a required field, and the front-end save silently no-ops when the form is invalid. The test tasks had no due date, so nothing persisted. Fixed by filling the due date before saving.task-collaborationesm.sh) + signalling server (signaling.yjs.dev). It never initialised, so.decker-collab-statusnever appeared.task-collaboration(checkbox)max_priorityvia the REST API, but the plugin does not register its task meta for REST, so the write was dropped. Fixed by driving the value through the real form save.What changed
Fixes
calendar.spec.js,task-collaboration.spec.js→ front-end navigation.task-locking.spec.js→ fill the required due date before each save.task-collaboration.spec.js→ checkbox test round-trips through the real save.Collaboration kept out of the CI gate
testIgnoreunlessDECKER_E2E_COLLAB=1).make test-e2e-collabtarget enablescollaborative_editing, runs the spec, and restores the setting.make setup-tests-envnow forcescollaborative_editing=0so the deterministic suite is unaffected.Coverage: replace WP-core boilerplate with Decker flows
edit-posts.test.jsandhello.test.js(they tested WordPress core, not Decker).smoke.spec.js— the front-end app shell boots and sidebar navigation works.board.spec.js— the Kanban board renders its stack columns, and a task created through the real task form lands in the TO-DO column (full create → save → render round-trip).Results
make test-e2e(the CI command): 12 passed.make test-e2e-collab(manual): 6 passed.Follow-up
The REST endpoint
/wp/v2/taskssilently dropsstack/max_priority/duedatemeta because it is not registered for REST. Tracked separately in #272 (fix in #273).