Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hello @M0rgan01! This is your first pull request on ui-testing-library repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
mattgoud
left a comment
There was a problem hiding this comment.
Review 🟠 changes requested
Checks
.ai conventions: 🔴 1 departure
| Source | Result |
|---|---|
| Contexts read | core .ai/CONTEXT.md, Playwright/CONTEXT.md, create-playwright-page-objects (the script's Javascript match concerns admin pages, not page objects) |
pr-hygiene.py |
🟢 clean |
Tested on: pr-1144 @ 0b1788e, rebased on main; validation through PrestaShop/PrestaShop#43433, which pins this branch
Run: full UI campaign on PrestaShop/PrestaShop#43433: functional:BO:shop-parameters:05-07 green (793 passing, the five Stores campaigns included, two status toggles in 0.4 s each); at review time 34 jobs green, 10 running, 2 red and unrelated to Stores (FO order confirmation carrier step, GDPR PDF)
Not run: locally; library CI (lint, type check) still pending
The version split holds: versions/9.2 is the former develop page moved byte for byte, and the resolver keeps it below 9.3.0 (develop and nightly resolve to 99.99.99).
Findings
- 🟠 Should fix: three selectors are built inline in methods (
index.ts:289,345,384) instead of the selector list. - 🟡 Nit: the country-change comment and the
networkidlewait increate.ts:96-98describe and wait for nothing.
Open questions
- Could you add
[OS-164]at the end of the title? The Jira ticket has no PR in its Development panel yet.
| ]); | ||
| private async openBulkActionsMenu(page: Page): Promise<void> { | ||
| await page.locator(this.selectAllCheckbox).click(); | ||
| await page.locator(`${this.bulkActionMenuButton}:not([disabled])`).waitFor({state: 'visible'}); |
There was a problem hiding this comment.
🟠 Should fix: this method builds a selector inline (${this.bulkActionMenuButton}:not([disabled])), and so do getStoreStatus (line 289, ${this.tableColumnStatus(row)} input:checked) and sortTable (line 384, [data-sort-direction="..."]). In this library every selector, state variants and composed ones included, is a private readonly member assigned in the constructor: move the three to the list, for example bulkActionMenuButtonEnabled, tableColumnStatusChecked(row) and sortColumnDirectionDiv(column, direction).
| await this.setValue(page, this.cityInput, storeData.city); | ||
| // Changing the country reloads the postcode and state fields | ||
| await this.selectByVisibleText(page, this.countrySelect, storeData.country); | ||
| await page.waitForLoadState('networkidle'); |
There was a problem hiding this comment.
🟡 Nit: the store form's country change only reloads the state list (CountryStateSelectionToggler, admin-dev/themes/new-theme/js/pages/store/form.ts), not the postcode, so the comment above is inaccurate. waitForLoadState('networkidle') also returns at once once the document has reached that state, so it does not wait for that request. Nothing sets the state today, so you can drop both lines; if a campaign sets it later, wait for the states response together with the select.
The Stores page (Shop Parameters > Contact > Stores) is migrated to Symfony in PrestaShop 9.3 (PrestaShop/PrestaShop#41414) and its feature flag becomes stable in 9.3.
versions/9.2/pages/BO/shopParameters/stores/{index,create}.ts: the legacy page objects, moved as-is.versions/develop/pages/BO/shopParameters/stores/{index,create}.ts: rewritten for the Symfony grid and forms. The interfaces are unchanged.pages/BO/shopParameters/stores/{index,create}.ts: return the legacy page objects for PrestaShop < 9.3.0, the Symfony ones otherwise.Column, filter and sort identifiers now follow the Symfony grid (
name,address,state,country, sort directionasc/desc), and the pagination label is the Symfony one ((page 1 / 2)).Related core PR (to merge after this one): PrestaShop/PrestaShop#43433
Tested locally against a fresh
developshop with thestorefeature flag enabled: the Stores campaigns (filter & quick edit, CRUD, bulk actions, contact details, sort & pagination),WS/04_storesCRUDandaudit/BO/12_shopParameterspass.🤖 Generated with Claude Code