Skip to content

TE: migrate BOCountriesPage to Symfony selectors (country flag GA)#978

Closed
mattgoud wants to merge 1 commit into
PrestaShop:mainfrom
mattgoud:feat/promote-countries-feature-flag-ga
Closed

TE: migrate BOCountriesPage to Symfony selectors (country flag GA)#978
mattgoud wants to merge 1 commit into
PrestaShop:mainfrom
mattgoud:feat/promote-countries-feature-flag-ga

Conversation

@mattgoud
Copy link
Copy Markdown
Contributor

@mattgoud mattgoud commented May 25, 2026

Context

The country feature flag is promoted to stable/state=1 in PrestaShop (see PrestaShop/PrestaShop#41548). The Symfony-migrated Countries page is now always active, making the legacy selectors in BOCountriesPage obsolete.

Changes

Rewrites src/versions/develop/pages/BO/international/locations/countries/index.ts from legacy to Symfony selectors:

Before (legacy) After (Symfony)
#form-country #country_grid_panel
#table-country #country_grid_table
tr.filter [name='countryFilter_*'] tr.column-filters td[data-column-id="*"]
Column positions (td:nth-child(n)) CSS classes (.column-name, .column-zone_name, …)
i.icon-caret-up/down sort buttons span.ps-sort + data-sort-direction attributes
Legacy pagination .pagination.pull-right div.pagination-block
Bulk actions via legacy dropdown #country_grid .js-bulk-actions-btn
Status toggle .action-enabled/disabled .ps-switch input:checked
module.exports = new BOCountriesPage() export {boCountriesPage, BOCountriesPage}

Notable behavior change: The Symfony Countries grid has no bulk-delete action. deleteCountriesByBulkActions() is kept in the API but implemented as sequential individual row deletes, so existing tests continue to work without changes.

settingsUpdateMessage updated from the legacy flash to the Symfony flash: 'Update successful'.

Merge order

This PR must be merged and a new version published before PrestaShop/PrestaShop#41548 can be merged.

  1. This PR (TE: migrate BOCountriesPage to Symfony selectors (country flag GA) #978) — update BOCountriesPage to Symfony selectors
  2. TE: promote 'country' feature flag to stable, migrate Playwright tests to Symfony selectors PrestaShop#41548 — promote country feature flag to stable + migrate Playwright tests
  3. TE: add automation test for BO > International > Locations > Countries > Help button PrestaShop#41540 — help button test (unblocked once #41548 is merged)

Related

The 'country' feature flag is promoted to stable/enabled (state=1) in PrestaShop.
The legacy controller is no longer used — update the page object to use the
Symfony grid selectors.

Key changes vs legacy:
- Grid: #form-country/#table-country → #country_grid_panel/#country_grid_table
- Filter: countryFilter_* → td[data-column-id="*"]
- Columns: nth-child() positions → .column-* CSS classes
- Sort: icon-caret-up/down → ps-sort + data-sort-direction
- Pagination: legacy .pagination.pull-right → pagination-block
- Bulk: legacy dropdown → #country_grid .js-bulk-actions-btn
- Status toggle: action-enabled/disabled → .ps-switch input:checked
- deleteCountriesByBulkActions: no bulk-delete in Symfony grid,
  implement as individual row deletes
- Options form: PS_RESTRICT_DELIVERED_COUNTRIES_on/off →
  country_options_block_restrict_country_to_delivery_1/0
- settingsUpdateMessage: legacy flash → 'Update successful'
- Export: module.exports → ES module named export {boCountriesPage, BOCountriesPage}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's denied. We don't add any E2E Tests on pages behind disabled features flag.

@ps-jarvis ps-jarvis moved this from Ready for review to Waiting for author in PR Dashboard May 26, 2026
@mattgoud
Copy link
Copy Markdown
Contributor Author

Closing this PR as per review feedback from @Progi1984: we don't add E2E tests on pages behind a disabled feature flag. The country feature flag is still state="0" (legacy page by default), so Symfony selectors should not be added to the testing library yet. This PR will be reopened when the country feature flag is promoted to GA (state="1").

@mattgoud mattgoud closed this May 26, 2026
@github-project-automation github-project-automation Bot moved this from Waiting for author to Closed in PR Dashboard May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants