test: create pages through addPage from @jahia/cypress - #461
Merged
Conversation
addSimplePage keeps its signature and now delegates to addPage, so none of its eight call sites moves. This helper already passed children straight through, so the delegation is one-to-one, and addNode leaves the import because nothing else in the file used it. The range moves to ^8.4.0 in both workspaces: addPage ships in 8.4.0, and the previous ^8.0.0 resolved to 8.2.1 through the lockfile.
🦜 ChachalogNo changelog entries detected. Learn more about Chachalog. Create a new entry online or run |
Experiment, to be reverted. Keeps the @jahia/cypress bump to 8.4.0 and puts the original addSimplePage back, so the next run tells whether the 61-login footer failure comes from the helper rewrite or from the dependency bump itself.
…I failure" This reverts commit a60d80e.
The suite failed on the first test of 61-login.cy.ts because the spec-marker beforeEach that 8.3.0 added promoted the visitor's just-logged-out session to root before the first render. Jahia/jahia-cypress#251 tracked it and 8.5.0 carries the fix. Both workspaces move, and both lockfiles resolve 8.5.0. The tests workspace is the one that matters here, and the Renovate bump that only touched the root lockfile could not reach it.
1 task
|
jahia-carp
marked this pull request as ready for review
September 3, 2026 13:43
GauBen
approved these changes
Sep 3, 2026
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.





Summary
addSimplePageintests/cypress/support/test-helpers.tswas a local copy of a page-creation helper that six Jahia repositories each maintained separately.@jahia/cypress8.4.0 shipsaddPage, so the copy is no longer needed: this helper keeps its name and signature and now delegates to it.Why
The duplication is tracked by
Jahia/jahia-private#3251.addPagewas added inJahia/jahia-cypress#245and published in 8.4.0.Two repositories migrated first and are merged, each returning the same test counts as its base run:
Jahia/client-cache-control#83andJahia/site-settings-seo#376.Changes
tests/cypress/support/test-helpers.ts:addSimplePagedelegates toaddPageinstead of building theaddNodemutation itself. Its signature is unchanged, so none of its eight call sites moves.addNodeleaves the import, because nothing else in this file used it.package.json,tests/package.jsonand both lockfiles:@jahia/cypressmoves from^8.0.0to^8.5.0.This copy already passed
children,mixinsandpropertiesstraight through and added no default page structure, so the delegation is one to one. It also sent atitlevariable thataddNodedoes not declare. That variable reached nothing and is gone.The test that failed, and why the version moved to 8.5.0
The first version of this branch pinned 8.4.0, and one test failed reproducibly over three runs:
The failure came from the version bump and not from the helper. A commit on this branch restored the original
addNodehelper while keeping 8.4.0, and the same test failed the same way. That commit was reverted.It was reported as
Jahia/jahia-cypress#251, and @x0h01 bisected it toJahia/jahia-cypress#234, the spec marker in the Jahia log. That marker registers a root-levelbeforeEach, whosecy.executeGroovycall runs between the describe-levelcy.logout()and the firstcy.visit(). The call authenticates as root over acy.request(), which carries the browser's cookies. The marker therefore promoted the visitor's own session to root before the first render. Only the first test of a spec is exposed, which is what the symptom showed.The report first suspected
Jahia/jahia-cypress#228. That guess was wrong:Jahia/jahia-cypress#228merged seven weeks before the 8.2.1 tag, so it is already inside the passing baseline.Jahia/jahia-cypress#253fixes it, and 8.5.0 carries the fix. This branch therefore moves to^8.5.0.Fourteen specs of this suite end their describe-level
beforehook withcy.logout(). The fix has to hold for all fourteen, and not only for61-login.cy.ts.Validation
integration-testson this head returns 96 tests, 96 passing, 0 failing, 0 skipped, over 25 specs, in run 33760288769. The nightly onmaingives the same 96 and 0, so the migration and the version move together leave every count unchanged.The test that failed at 8.4.0 now passes by name:
Every spec passed, not only that one, which matters because fourteen specs of this suite carry the
beforehook pattern the regression exposed.Also checked:
yarn install --mode=update-lockfileresolves 8.5.0 in both workspaces. The e2e suite was not run locally, because no Jahia was started for it.Note on the Renovate bump
Jahia/luxe-jahia-demo#465raises@jahia/cypressto 8.5.0 in the root lockfile only, andtests/has its own lockfile. It therefore cannot change what the Cypress suite resolves. The same shape closedJahia/luxe-jahia-demo#450on 2026-08-31.