Fix 1.8.0: restore v9 area base pages, wire per-suite version - #70
Merged
Merged
Conversation
…sion apply
Two defects shipped in 1.8.0.
The Common-to-v9 migration deleted Pages\v9\FrontOffice\Page and
Pages\v9\BackOffice\Page. importPage('FrontOffice') resolves to the first
on PrestaShop 9, so it failed with "Class not found" there, which made
VisualTestsSuite unusable on 9, and every custom page extending either
class broke. Both are back as thin subclasses of the Common bases, like
their v7 and v8 counterparts.
$psVersion and onVersion() never reached a real suite: loadGlobals() took
PRESTAFLOW_PS_VERSION as is, and only resolveVersion() knows about the
overrides. The existing tests called resolveVersion() themselves, so they
passed. loadGlobals() now resolves the version, and onVersion() resolves
it again once the globals are loaded, so the pages imported next come
from the pinned namespace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two defects that shipped in 1.8.0.
importPage('FrontOffice')fails on PrestaShop 9The Common→v9 migration (ec2e8fe) deleted
Pages\v9\FrontOffice\PageandPages\v9\BackOffice\Page. On PS 9,importPage('FrontOffice')resolves to the first one and fails withClass "\PrestaFlow\Library\Pages\v9\FrontOffice\Page" not found. So:VisualTestsSuite(feat(visual): VisualTestsSuite data-driven + masques + options navigateur #67) is unusable on PS 9;CI didn't catch it:
VisualTestsSuiteTeststubs outimportVisualPage(), and the smoke suites never import the bare area.Fix: both classes are back as thin subclasses of the
Commonbases, like v7/v8.$psVersion/onVersion()have no effectloadGlobals()tookPRESTAFLOW_PS_VERSIONas is. OnlyresolveVersion()knows about the overrides, and nothing called it on a real suite.VersionOverrideTestcalled it by hand, so it passed.Fix:
loadGlobals()resolves the version, andonVersion()resolves it again once the globals are loaded, so pages imported next come from the pinned namespace.Tests
VersionBasePagesTest: every version keeps both area bases (failed on the two v9 cases before the fix).SuiteVersionWiringTest: property andonVersion()applied on a realTestsSuite, includingonVersion()insideinit()deciding whatimportPage()loads (3 of 4 failed before the fix).🤖 Generated with Claude Code