Skip to content

E2e pilot - #5765

Merged
jardakotesovec merged 40 commits into
pkp:mainfrom
jardakotesovec:e2e_ng_2
Aug 26, 2026
Merged

jardakotesovec merged 40 commits into
pkp:mainfrom
jardakotesovec:e2e_ng_2

Conversation

@jardakotesovec

Copy link
Copy Markdown
Contributor

No description provided.

…, RUNBOOK, TEMPLATE, PRINCIPLES incl. scenario-endpoint design record, APP-GLOSSARY, PROGRESS restart plan, harness skill as design record)
docs/product + docs/e2e now live in lib/pkp (one shared copy for ojs/omp/ops).
Skill: design-record banners on users/patterns/scenarios, commit-discipline
deduped to RUNBOOK, doc paths updated to lib/pkp/docs, seeded-user counts
fixed (18/17), wave headings merged, stale citations removed.
…hyphenless tags

SKILL.md still taught the pre-ruling model (shared feature tests in
lib/pkp/playwright) - now: feature suites always in the app's own repo,
lib/pkp/playwright keeps infrastructure only. patterns.md tag convention
recommended hyphenated tags its own lesson 10 forbids for search assertions;
now single hyphenless alphanumeric tokens.
…rlay + Playwright wiring

OJS overlays for the shared test API (JournalScenarioController: sections/
issues/ISSN context keys, users[].sections via SubEditorsDAO::insertEditor,
sendExternalReview as the review-promoting decision), TestBootstrapController,
site-level _test dispatcher. tools/installTest.php (self-healing from empty
or partial DB, --recreate-db, non-zero exit on failure) + tools/testServer.sh.

Playwright wiring: config (port 8000), app.context.js (APP-GLOSSARY
capabilities + 18-archetype actor map), bootstrap fixture (journal, roster,
ART/REV w/ section editors, category tree, both issues, enriched defaults),
fixtures.js, .env.playwright.example, nine test:e2e:* scripts,
@playwright/test devDependency. Verified: empty DB -> setup green in one go;
login smoke green twice at 2 and 4 workers (per-worker php -S servers).
…t, restart step 2)

Banners and structure updated to the rebuilt harness: step-2 scenario schema
marked live vs recorded-future, scenarios/context route, four Playwright
projects + per-worker php -S servers, corrected auth liveness probe
(follow redirects, judge by where the request ends), LoginPage maxlength
handling, self-healing installTest, per-app roster enrolment facts (OMP
reviewer split, OPS moderators + visibility control).
… test layer

A test result that contradicts the spec about who is allowed to do what is
reported to the orchestrator (RUNBOOK step 7 hands it to verification), never
parked as a skipped/fixme test or a 'not covered' header note.
One test per common canonical scenario, plus three POMs kept in the app
repo (UsersAndRolesPage, InviteUserWizardPage, AcceptInvitationPage) so the
three fleets don't collide in the shared submodule.

InviteUserWizardPage addresses role rows structurally and their fields by
form name: the wizard gives every row the same control identifiers, so
getByRole/getByLabel cannot reach rows two and up. That defect is a product
finding (register A18), recorded here only as the workaround it forced —
see docs/e2e/app-changes.md row 13.

Skill: `invitations[]` seed key reference, corrected OPS roster (Editorial
Board Member is its only assistant-slot group; role keys carry no `funding`,
and the reviewer key is externalReviewer), and the 127.0.0.1 host fact —
all three fleets pin allowed_hosts, so page requests via localhost 400 while
the test API answers on either host.
…ist on this install

users[].roles now takes 'siteAdmin' to seed a throwaway site administrator (the
only way to get a second one: no screen grants the role). Documented in
scenarios.md and users.md alongside the existing keys.

Also replaces every 'scope by recipient + the per-app tag' instruction with the
technique that is actually available - unique throwaway recipient addresses plus
a positive control for silence. GET /api/v1/tags returns [] and every message
carries Tags: []; find()'s 'contains' is a subject/body content marker, not a
tag.
One test per canonical scenario. UsersAndRolesPage extended rather than
duplicated (search, count, row menu, row actions, disabled mark), with a
settle() that pins the "Current Users" heading to the users API's own
answer — the count reads (0) until that call returns.

Every account a test acts on is one the test created in its own scratch
journal: these scenarios disable, remove roles and merge, and merging
deletes an account permanently. Verified after both runs that all 18
seeded accounts survive, none disabled, and admin keeps its role.

The row menu is not portalled and stays open when another row's is
opened; locators are scoped to the row. Recorded in the POM header.
…st API, tools, npm wiring); skill re-bannered as design record

Claude-Session: https://claude.ai/code/session_017xDb4WEmXXx4yV4WKtsFPH
OJS side of the clean-room rebuild: api/v1/_test wiring (TestController),
classes/testing subclasses (sections by abbrev, issues overlay, section/issue
submission overlays; first bootstrap section renames the hook default instead
of duplicating it), playwright tree (config on 8000, app.context capability
map + seed.actors, bootstrap fixture: publicknowledge, 2 sections, 7
categories, 2 issues, 17 users), tools/installTest.php, npm scripts,
@playwright/test dep. Skill flipped to live truth (step-1 acceptance green on
all three fleets).

Claude-Session: https://claude.ai/code/session_01CyXvyV4f5CbkB8wz8Z3ipX
scenarios.md live section: submitted defaults true; abstract is defaulted
(wizard-required); bootstrap's first section renames the hook default;
submitted seeds carry the APPROVE_SUBMISSION notification tail + primary
contact (parity fixes). users.md: role keys resolve via
UserSeeder::resolveUserGroup. patterns.md: no queries table on this schema —
discussions are edit_tasks (2026-07-31); scenario POSTs go through pkpApi
until the spec-builders return. SKILL.md companion line matches.

Claude-Session: https://claude.ai/code/session_01CyXvyV4f5CbkB8wz8Z3ipX
8 scenario tests + invitation POMs, derived from the verified spec;
green twice against the OJS fleet.

Claude-Session: https://claude.ai/code/session_01CyXvyV4f5CbkB8wz8Z3ipX
12 tests, one per common canonical scenario (S13 OMP-only, S14 OPS-only),
derived from lib/pkp docs/product/specs/review-stage-and-rounds.md. New
app-local POMs (ReviewStagePages), jQuery-idle helper, upload fixture.
Green x2 + post-claim-check confirm on the OJS fleet.

Claude-Session: https://claude.ai/code/session_017xDb4WEmXXx4yV4WKtsFPH
…lf-healing rule)

Dashboard search drift found during U25: Search.vue commits on Enter only.
Helper now scopes to the in-page searchbox and waits on the Search Results
row; U26 OJS suite re-run green (13 passed). patterns.md debt note closed.

Claude-Session: https://claude.ai/code/session_01CyXvyV4f5CbkB8wz8Z3ipX
…x, doc-drift sweep

- ORCID suites describe.skip'd (main + serial) pending a decision on handling
  ORCID's external communication in tests. Local config.test.inc.php (gitignored
  by design) gains the dead-port [proxy] so server-side outbound HTTP fails
  fast — documented in RUNBOOK env invariants + skill patterns.
- ReviewStagePages#addReviewer: wait for personalMessage TinyMCE init before
  selecting a reviewer — pre-existing race exposed once animations stopped
  masking it (template copied client-side at select-time; uninitialized editor
  lost the body and update-reviewer 500'd on the null message).
- skill docs: reference-accuracy sweep (stale line refs, nonexistent helpers),
  server-log/auto-worker/animations/egress notes; .gitignore
  playwright/.server-logs/; .env.playwright.example: unset workers = auto.
… docs

- js/pkp.min.js recompiled (was 2026-03-17, missing July Handler.js/
  SiteHandler.js changes) via the Closure minify pass; the local
  config.test.inc.php now sets enable_minified=On so backend pages load one
  bundle instead of ~107 scripts (−5% wall, −14% CPU measured).
- docs/env example: worker auto-detect is now cores − 2.
…b/pkp

SKILL.md is now a thin entry point (trigger + OJS deltas + app-map) pointing
at the shared lib/pkp/docs/e2e/dev/ harness docs; patterns/scenarios/users.md
moved there (single home reachable from all three apps). app-map.md gains a
live-vs-recorded POM banner. PRINCIPLES citations in test comments updated to
the new A/M/D numbering.
Skill points at lib/pkp/docs/e2e/process/ + the merged specs/GLOSSARY.md;
spec-path citations in suite/POM comments updated to the numbered
U<nn>- filenames; OrcidPages evidence citation now names the U04 spec
footnotes instead of deletable .reports scratch.
… shape

Issue accessStatus derived per IssueForm::execute (publishing mode); issue
publish mirrors IssueGridHandler::publishIssue order incl. hook + guarded
DOI calls. Part of the 2026-08-23 parity-fix set (see lib/pkp parity
ledger).
SKILL.md becomes docs/e2e/README.md (same OJS-specific facts + shared-doc
pointers); app-map.md moves to docs/e2e/app-map.md. Shared-doc references
repointed in the matching lib/pkp commit.

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
…A5 moot

Non-coverage notes updated after the 2026-08-25 upstream-rebase impact check
(details in the matching lib/pkp commit). Assertions unchanged; suite green
on a cold-bootstrapped post-rebase DB.

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
…s/app-map-ojs.md

No app-side e2e doc tree; lib/pkp/docs/e2e is the single home (matching
lib/pkp commit repoints the references).

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
…o execute()

First statement now exits on any web SAPI, before any side effect (the
inherited CommandLineTool guard only fires after full app bootstrap). The
hand-rolled ini parsing, DB-name gate and param assembly move inside
execute() using Config::getVar from the bootstrapped temp config; only the
irreducible pre-bootstrap step remains (the installed=Off temp copy — with
installed=On an empty DB fatals on the versions query during bootstrap),
now cleaned up via shutdown hook. Verified: CLI no-op ×3 apps, cold install
+ full OJS suite green (49 passed), web probe refused in 27ms with zero
side effects.

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
- .github/workflows/playwright.yml: single-job ubuntu-latest run — PHP 8.3,
  Postgres 16 + Mailpit services, Node 20, composer/npm/Playwright caches,
  TEMPORARY lib/pkp fetch override (campaign convention: no submodule re-pins)
- .github/ci/config.test.inc.php: CI config template (paths + DB creds as
  placeholders), derived from the local reference config
…ubuntu-latest

Suite step 197/204/273 s across three runs at 4 workers vs 274/321/300 s at
the auto-detected 2 (and 297/294 s at 3 — a wash). All runs 51 passed, zero
flake/retries. Wait-bound workload: overcommitting the 4 vcpus wins.
.github/ci/config.test.inc.php (593-line snapshot, already drifting: stale
key set, stray port semicolon) is replaced by the shared generator
(lib/pkp a9e45e5486) run against config.TEMPLATE.inc.php at CI time — the
same way the Cypress CI's installer derives its config from the template.

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
The e2e campaign now lives in https://github.com/jardakotesovec/pkp-e2e
(harness, suites, specs, docs, CI); its bin/mount.js copies the runtime
overlays into checkouts. This branch keeps ONLY the thin CI hook
(.github/workflows/e2e-tests.yml) delegating to pkp-e2e's reusable
workflow — ready for maintainer review. Pre-reduction history: 182b52c.

Claude-Session: https://claude.ai/code/session_01QGhoKErDRpxogYdPWKPrBw
@jardakotesovec
jardakotesovec merged commit 20fc190 into pkp:main Aug 26, 2026
7 of 10 checks passed
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