feat: add page-object overrides for PS 8.0, 8.1, and 8.2#893
Closed
Clap404 wants to merge 2 commits intoPrestaShop:mainfrom
Closed
feat: add page-object overrides for PS 8.0, 8.1, and 8.2#893Clap404 wants to merge 2 commits intoPrestaShop:mainfrom
Clap404 wants to merge 2 commits intoPrestaShop:mainfrom
Conversation
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>
… 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>
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.
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.
fix FO home import path (remove trailing /index)
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