Skip to content

Fix 1.8.0: restore v9 area base pages, wire per-suite version - #70

Merged
PrestaEdit merged 1 commit into
mainfrom
fix/1.8.1
Sep 28, 2026
Merged

PrestaEdit merged 1 commit into
mainfrom
fix/1.8.1

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

Two defects that shipped in 1.8.0.

importPage('FrontOffice') fails on PrestaShop 9

The Common→v9 migration (ec2e8fe) deleted Pages\v9\FrontOffice\Page and Pages\v9\BackOffice\Page. On PS 9, importPage('FrontOffice') resolves to the first one and fails with Class "\PrestaFlow\Library\Pages\v9\FrontOffice\Page" not found. So:

CI didn't catch it: VisualTestsSuiteTest stubs out importVisualPage(), and the smoke suites never import the bare area.

Fix: both classes are back as thin subclasses of the Common bases, like v7/v8.

$psVersion / onVersion() have no effect

loadGlobals() took PRESTAFLOW_PS_VERSION as is. Only resolveVersion() knows about the overrides, and nothing called it on a real suite. VersionOverrideTest called it by hand, so it passed.

Fix: loadGlobals() resolves the version, and onVersion() 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 and onVersion() applied on a real TestsSuite, including onVersion() inside init() deciding what importPage() loads (3 of 4 failed before the fix).
  • Unit suite: 399 tests green. Not validated live against a shop.

🤖 Generated with Claude Code

…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>
@PrestaEdit
PrestaEdit merged commit fd32c9e into main Sep 28, 2026
9 checks passed
@PrestaEdit
PrestaEdit deleted the fix/1.8.1 branch September 28, 2026 14:27
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