Skip to content

feat: add page-object overrides for PS 8.0, 8.1, and 8.2#893

Closed
Clap404 wants to merge 2 commits intoPrestaShop:mainfrom
Clap404:feat/ps-8x-version-support
Closed

feat: add page-object overrides for PS 8.0, 8.1, and 8.2#893
Clap404 wants to merge 2 commits intoPrestaShop:mainfrom
Clap404:feat/ps-8x-version-support

Conversation

@Clap404
Copy link
Copy Markdown

@Clap404 Clap404 commented Mar 26, 2026

Add version-specific page object classes that override selectors and methods
which differ from the develop baseline in the PS 8.x series. All classes
extend their nearest parent version and only override diverging behaviour.

  • 8.0: customers/addresses (create + index), orders/create, carriers/index
  • 8.1: customers/addresses (create + index), orders/create, carriers/index,
    fix FO home import path (remove trailing /index)
  • 8.2: catalog/products/create — new setProductName override (multi-language
    aware); customers/addresses (create + index); orders/create;
    carriers/create — replace blind sleeps with waitForVisibleSelector
    step-transition guards and a bounded waitForResponse for the price XHR;
    carriers/index — convert to ESM named export (required for subclassing
    by 1.x version files); FO/classic/searchResults

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Questions Answers
Description? Please be specific when describing this change. What did you change? Why?
Type? bug fix / improvement / new feature / refactor
BC breaks? yes / no
Deprecations? yes / no
Fixed ticket? Fixes #{issue URL here}, Fixes #{another issue URL here}
Sponsor company Your company or customer's name goes here (if applicable).
How to test? Indicate how to verify that this change works as expected.

Add version-specific page object classes that override selectors and methods
which differ from the develop baseline in the PS 8.x series. All classes
extend their nearest parent version and only override diverging behaviour.

- 8.0: customers/addresses (create + index), orders/create, carriers/index
- 8.1: customers/addresses (create + index), orders/create, carriers/index,
       fix FO home import path (remove trailing /index)
- 8.2: catalog/products/create — new setProductName override (multi-language
       aware); customers/addresses (create + index); orders/create;
       carriers/create — replace blind sleeps with waitForVisibleSelector
       step-transition guards and a bounded waitForResponse for the price XHR;
       carriers/index — convert to ESM named export (required for subclassing
       by 1.x version files); FO/classic/searchResults

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Clap404 Clap404 marked this pull request as ready for review March 26, 2026 10:37
… hangs

- Fix requirePage() for carriers/create and carriers/index to return the
  exported singleton (.boCarriersPage / .boCarriersCreatePage) instead of
  the whole module object
- Override goToEditCarrierPage in PS 8.2: use page.goto with
  waitUntil:'domcontentloaded' — the AdminCarrierWizard page never fires
  the 'load' event so clickAndWaitForURL always timed out
- Override createEditCarrier in PS 8.2: skip radio-button clicks when
  already in the desired state (they intercept clicks when checked, causing
  30s timeouts), call validateRange/enableRange via page.evaluate to
  enable price inputs, and guard weightMin with !== undefined so 0 is filled
- Fix race condition in addProductToCart: register waitForResponse before
  clicking 'add to cart' so a fast response isn't missed
- Fix customer-information waitForResponse: add .catch(() => null) since
  PS 8.2 may not have this endpoint
- build: use tsc; (semicolon) so alias step runs even on non-fatal type errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Clap404 Clap404 marked this pull request as draft March 26, 2026 19:23
@Clap404 Clap404 closed this Apr 1, 2026
@github-project-automation github-project-automation bot moved this to Closed in PR Dashboard Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants