Skip to content

[Behat] Fix flaky tests by correcting LiveComponent loading state detection#18448

Merged
NoResponseMate merged 4 commits intoSylius:2.1from
Rafikooo:refactor/behat-symfony-element
Oct 21, 2025
Merged

[Behat] Fix flaky tests by correcting LiveComponent loading state detection#18448
NoResponseMate merged 4 commits intoSylius:2.1from
Rafikooo:refactor/behat-symfony-element

Conversation

@Rafikooo
Copy link
Copy Markdown
Contributor

@Rafikooo Rafikooo commented Oct 17, 2025

Problem

Behat tests with LiveComponents are flaky on CI. The root cause is incorrect LiveComponent loading state detection - Sylius has been checking for [data-live-loading=true] which never existed in Symfony UX LiveComponent.

Root Cause Analysis

Incorrect Attribute History

  1. Before March 25, 2025: Sylius used jQuery AJAX detection

    $session->wait(1000, 'typeof jQuery !== "undefined" && 0 === jQuery.active');
  2. March 25, 2025 (PR: Changed it to:

    $session->wait(1000, "!document.querySelector('[data-live-loading=true]')");

    This attribute was never part of Symfony UX LiveComponent, causing waits to complete immediately even when LiveComponents were still loading.

Correct Attributes (Symfony UX LiveComponent v2.30.0)

According to symfony/ux-live-component source code:

handleLoadingToggle(component, isLoading, targetElement, backendRequest) {
  if (isLoading) {
    this.addAttributes(targetElement, ["busy"]);
    this.addAttributes(element, ["data-live-is-loading"]);
  }
}

The correct attributes are:

  • [busy] - set on target element during loading
  • [data-live-is-loading] - set on elements with data-loading directives

Solution

This PR fixes the issue by:

  1. Fixing loading state detection across all Behat helpers:

    • DriverHelper::waitForPageToLoad() - fixed to use [data-live-is-loading]
    • JQueryHelper methods - fixed to use [data-live-is-loading]
  2. Adding centralized wait logic in SyliusElement::getElement():

    • Automatically waits for ALL LiveComponents to finish before element interaction
    • Checks document.readyState, [data-live-is-loading], and [busy] attributes
    • Returns immediately if no loading is detected (fast path)
    • Max 5 second timeout to prevent hanging
  3. Renaming base classes for clarity:

    • SymfonyElementSyliusElement (contains Sylius-specific LiveComponent logic)
    • SymfonyPageSyliusPage (contains Sylius-specific page behavior)

Impact

  • ✅ Fixes flaky Behat tests with LiveComponents
  • ✅ Reduces false negatives on CI
  • ✅ Tests now properly wait for LiveComponent AJAX requests to complete
  • ✅ No behavior change for non-LiveComponent pages (fast path)

References

Summary by CodeRabbit

  • Refactor
    • Updated testing framework architecture with improved component synchronization and state detection, enhancing test reliability and execution stability.

@Rafikooo Rafikooo requested review from a team as code owners October 17, 2025 13:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 17, 2025

Walkthrough

This PR systematically refactors Behat test infrastructure to use internal Sylius-specific base classes. Multiple element and page classes are updated to extend SyliusElement and SyliusPage instead of external FriendsOfBehat framework classes. A new SyliusElement base class adds LiveComponent synchronization support. Selectors in helper classes are updated from [data-live-loading=true] to [data-live-is-loading].

Changes

Cohort / File(s) Summary
Admin element classes
src/Sylius/Behat/Element/Admin/Account/ResetElement.php, src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php, src/Sylius/Behat/Element/Admin/Channel/*, src/Sylius/Behat/Element/Admin/Crud/FormElement.php, src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php, src/Sylius/Behat/Element/Admin/NotificationsElement.php, src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php, src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php, src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php, src/Sylius/Behat/Element/Admin/TopBarElement.php
Updated to extend SyliusElement instead of Element; import updated from FriendsOfBehat\PageObjectExtension\Element\Element to Sylius\Behat\Element\SyliusElement
Core and product element classes
src/Sylius/Behat/Element/BrowserElement.php, src/Sylius/Behat/Element/SaveElement.php, src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php, src/Sylius/Behat/Element/Product/ShowPage/*
Updated to extend SyliusElement instead of Element; corresponding imports replaced
Shop element classes
src/Sylius/Behat/Element/Shop/Account/RegisterElement.php, src/Sylius/Behat/Element/Shop/CartWidgetElement.php, src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php, src/Sylius/Behat/Element/Shop/MenuElement.php
Updated to extend SyliusElement instead of Element; imports replaced
Admin page classes
src/Sylius/Behat/Page/Admin/Account/*, src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php, src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php, src/Sylius/Behat/Page/Admin/Crud/*, src/Sylius/Behat/Page/Admin/Customer/ShowPage.php, src/Sylius/Behat/Page/Admin/DashboardPage.php, src/Sylius/Behat/Page/Admin/Order/*, src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php, src/Sylius/Behat/Page/Admin/Product/ShowPage.php, src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
Updated to extend SyliusPage instead of SymfonyPage; import changed from Sylius\Behat\Page\SymfonyPage to Sylius\Behat\Page\SyliusPage
Shop page classes
src/Sylius/Behat/Page/Shop/Account/*, src/Sylius/Behat/Page/Shop/Checkout/*, src/Sylius/Behat/Page/Shop/HomePage.php, src/Sylius/Behat/Page/Shop/Order/ShowPage.php
Updated to extend SyliusPage instead of SymfonyPage; corresponding imports replaced
Admin page interfaces
src/Sylius/Behat/Page/Admin/Account/*Interface.php, src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php, src/Sylius/Behat/Page/Admin/Crud/*Interface.php, src/Sylius/Behat/Page/Admin/DashboardPageInterface.php, src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php, src/Sylius/Behat/Page/Admin/Order/*Interface.php, src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php, src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php, src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php, src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
Updated to extend SyliusPageInterface instead of SymfonyPageInterface; import changed from FriendsOfBehat\PageObjectExtension\Page\SymfonyPageInterface to Sylius\Behat\Page\SyliusPageInterface
Shop page interfaces
src/Sylius/Behat/Page/Shop/Account/*Interface.php, src/Sylius/Behat/Page/Shop/Checkout/*Interface.php, src/Sylius/Behat/Page/Shop/HomePageInterface.php, src/Sylius/Behat/Page/Shop/Order/ShowPageInterface.php
Updated to extend SyliusPageInterface instead of SymfonyPageInterface; corresponding imports replaced
Behat context classes
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php, src/Sylius/Behat/Context/Ui/Admin/Managing*.php, src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
Updated to use SyliusPageInterface instead of SymfonyPageInterface; method return types and docblocks updated
New base class and helpers
src/Sylius/Behat/Element/SyliusElement.php
New abstract class extending BaseElement; overrides getElement() to invoke waitForLiveComponentToFinish() method that synchronizes with LiveComponent completion
Loading selector updates
src/Sylius/Behat/Service/DriverHelper.php, src/Sylius/Behat/Service/JQueryHelper.php
Selector changed from [data-live-loading=true] to [data-live-is-loading] in JavaScript predicates for page/form loading detection

Sequence Diagram

sequenceDiagram
    participant Test as Test Code
    participant SyliusElement
    participant BaseElement as BaseElement
    participant DriverHelper
    participant Browser
    participant LiveComponent

    Test->>SyliusElement: getElement('name')
    activate SyliusElement
    SyliusElement->>SyliusElement: waitForLiveComponentToFinish()
    activate SyliusElement
    SyliusElement->>DriverHelper: isJavaScriptEnabled()
    alt JavaScript Enabled
        DriverHelper-->>SyliusElement: true
        SyliusElement->>Browser: Wait for doc.readyState='complete'
        Browser-->>SyliusElement: ready
        SyliusElement->>Browser: Wait for no [data-live-is-loading] elements
        Browser->>LiveComponent: Check loading state
        LiveComponent-->>Browser: loading complete
        Browser-->>SyliusElement: elements found
    else JavaScript Disabled
        DriverHelper-->>SyliusElement: false
        SyliusElement-->>SyliusElement: skip wait
    end
    deactivate SyliusElement
    SyliusElement->>BaseElement: getElement() [parent]
    BaseElement-->>SyliusElement: NodeElement
    SyliusElement-->>Test: NodeElement
    deactivate SyliusElement
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

This is a large-volume but highly repetitive refactoring. Once the pattern is understood (updating base classes and imports across ~130 files), verification becomes straightforward. The main complexity lies in the new SyliusElement.waitForLiveComponentToFinish() logic, which requires careful review. However, the homogeneous nature of most changes (simple class inheritance and import swaps) significantly reduces per-file review time.

Possibly related PRs

Suggested labels

Behat, Maintenance, Admin, Shop

Suggested reviewers

  • mpysiak
  • GSadee
  • Wojdylak

Poem

🐰 A Behat refactoring hop,
From external classes we don't stop,
SyliusElement takes the lead,
LiveComponents sync with speed,
Page by page, the tests now blend,
Internal base classes round the bend!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "[Behat] Fix flaky tests by correcting LiveComponent loading state detection" accurately captures the primary objective of the changeset. The raw summary confirms that the core changes address flaky Behat tests by updating LiveComponent loading detection logic from the incorrect [data-live-loading=true] selector to the correct [data-live-is-loading] selector, and by adding centralized wait logic in the new SyliusElement class. While the changeset includes extensive class renames (SymfonyElement → SyliusElement, SymfonyPage → SyliusPage), these are supporting refactorings that enable the centralized wait mechanism. The title is specific, clear, and directly conveys the main problem being solved without being vague or misleading.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 17, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from b08e1a5 to 41b7c66 Compare October 17, 2025 13:02
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (8)
src/Sylius/Behat/Element/SymfonyElementInterface.php (1)

7-8: Remove unused imports.

Both NodeElement and BaseElement are imported but not used in this interface.

Apply this diff to remove the unused imports:

 namespace Sylius\Behat\Element;
 
-use Behat\Mink\Element\NodeElement;
-use FriendsOfBehat\PageObjectExtension\Element\Element as BaseElement;
-
 interface SymfonyElementInterface
 {
 }
src/Sylius/Behat/Element/BrowserElement.php (1)

16-18: Migration complete; consider removing redundant import.

The base class change is correct and consistent with the broader refactoring. Note that the import on Line 16 is technically redundant since both BrowserElement and SymfonyElement reside in the same namespace (Sylius\Behat\Element).

If preferred, you can remove the redundant import:

 namespace Sylius\Behat\Element;
 
-use Sylius\Behat\Element\SymfonyElement;
-
 class BrowserElement extends SymfonyElement implements BrowserElementInterface
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1)

35-37: Consider removing redundant wait call.

The DriverHelper::waitForPageToLoad() at line 35 may be redundant since getElement('tree_taxons') at line 37 now automatically waits for LiveComponents via the SymfonyElement base class.

Apply this diff to remove the redundant wait:

-        DriverHelper::waitForPageToLoad($this->getSession());
-
         return count($this->getElement('tree_taxons')->findAll('css', '[data-test-tree-taxon]'));
src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (2)

18-18: Consider making the class final.

Per the Sylius coding standards, classes should be declared final unless they are entities, repositories, or intended for extension. If this element class is not designed to be extended, add the final modifier.

As per coding guidelines

-class DiscountedProductsCheckingPeriodInputElement extends SymfonyElement implements DiscountedProductsCheckingPeriodInputElementInterface
+final class DiscountedProductsCheckingPeriodInputElement extends SymfonyElement implements DiscountedProductsCheckingPeriodInputElementInterface

30-35: Add trailing comma to multi-line array.

For consistency with the Sylius coding standard, multi-line arrays should include a trailing comma after the last element.

As per coding guidelines

     protected function getDefinedElements(): array
     {
         return array_merge(parent::getDefinedElements(), [
             'discounted_products_checking_period' => '#sylius_admin_channel_channelPriceHistoryConfig_lowestPriceForDiscountedProductsCheckingPeriod',
         ]);
     }
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (2)

19-19: Consider making the class final.

Per the Sylius coding standards, classes should be declared final unless they are entities, repositories, or intended for extension. If this element class is not designed to be extended, add the final modifier.

As per coding guidelines

-class VariantsElement extends SymfonyElement implements VariantsElementInterface
+final class VariantsElement extends SymfonyElement implements VariantsElementInterface

78-84: Add trailing comma to multi-line array.

For consistency with the Sylius coding standard, multi-line arrays should include a trailing comma after the last element.

As per coding guidelines

     protected function getDefinedElements(): array
     {
         return array_merge(parent::getDefinedElements(), [
             'variant' => '[data-test-variant="%code%"]',
             'variant_pricing_row' => '[data-test-variant-pricing="%channel_code%.%variant_code%"]',
         ]);
     }
src/Sylius/Behat/Element/SymfonyElement.php (1)

20-35: Verification confirms the timeout and scope differences; redundant manual waits found in SymfonyElement subclasses.

All observations in the review comment are accurate:

  • DriverHelper::waitForPageToLoad() waits 1000ms vs. the new method's 10000ms timeout
  • Selector style differs: querySelectorAll(...).length === 0 vs. !document.querySelector(...)
  • The new method checks both [data-live-is-loading] and [busy] attributes; DriverHelper checks only [data-live-is-loading]

However, verification reveals a more critical issue: SaveElement and RegisterElement both extend SymfonyElement and thus already receive the automatic 10-second comprehensive wait via the inherited getElement() override, yet they explicitly call DriverHelper::waitForPageToLoad() afterward—a functionally inferior 1-second wait that checks only one attribute. This redundancy should be eliminated in these Element classes.

SymfonyPage (which uses waitForPageToLoad) exists in a separate class hierarchy (extends BaseSymfonyPage) and does not inherit from SymfonyElement, so it does not benefit from automatic waiting and appropriately retains the manual call.

Consider deprecating DriverHelper::waitForPageToLoad() or updating its timeout and scope to match the comprehensive approach, and remove redundant calls from SymfonyElement subclasses.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf36bcc and 41b7c66.

📒 Files selected for processing (35)
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php (1 hunks)
  • src/Sylius/Behat/Element/BrowserElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1 hunks)
  • src/Sylius/Behat/Element/SaveElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/MenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/SymfonyElement.php (1 hunks)
  • src/Sylius/Behat/Element/SymfonyElementInterface.php (1 hunks)
  • src/Sylius/Behat/Service/DriverHelper.php (1 hunks)
  • src/Sylius/Behat/Service/JQueryHelper.php (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,yaml,yml,xml,twig}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation in PHP, YAML, XML, and Twig files

Files:

  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Service/JQueryHelper.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Element/SymfonyElementInterface.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Service/DriverHelper.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Element/SymfonyElement.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
**/*.php

📄 CodeRabbit inference engine (AGENTS.md)

**/*.php: Use modern PHP 8.2+ syntax and features
Declare strict_types=1 in all PHP files
Follow the Sylius Coding Standard
Do not use deprecated features from PHP, Symfony, or Sylius
Use final for all classes, except entities and repositories
Use readonly for immutable services and value objects
Add type declarations for all properties, arguments, and return values
Use camelCase for variables and method names
Use SCREAMING_SNAKE_CASE for constants
Use fast returns instead of unnecessary nesting
Use trailing commas in multi-line arrays and argument lists
Order array keys alphabetically where applicable
Use PHPDoc only when necessary (e.g., @var Collection)
Group class elements in order: constants, properties, constructor, public, protected, private methods
Group getter and setter methods for the same properties together
Suffix interfaces with Interface and traits with Trait
Use use statements for all non-global classes
Sort use imports alphabetically and group by type (classes, functions, constants)

Files:

  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Service/JQueryHelper.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Element/SymfonyElementInterface.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Service/DriverHelper.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Element/SymfonyElement.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
🧬 Code graph analysis (33)
src/Sylius/Behat/Element/BrowserElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (3)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)
  • FilterElement (19-76)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
  • FilterElement (18-45)
src/Sylius/Behat/Element/Admin/TopBarElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (2)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Service/JQueryHelper.php (1)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/SaveElement.php (2)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/NotificationsElement.php (2)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (3)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1)
  • FilterElement (18-43)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
  • FilterElement (18-45)
src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (2)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)
  • FilterElement (19-76)
src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Shop/MenuElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (2)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/SymfonyElement.php (1)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)
src/Sylius/Behat/Element/SymfonyElement.php (1)
  • SymfonyElement (11-36)
🪛 PHPMD (2.15.0)
src/Sylius/Behat/Service/JQueryHelper.php

26-26: Avoid unused parameters such as '$timeout'. (undefined)

(UnusedFormalParameter)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.4, Symfony ^7.3, MariaDB 11.4.7, State Machine Adapter symfony_workflow, ApiPlatform ~4.1.7
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.4, Symfony ^7.3, MariaDB 11.4.7, State Machine Adapter symfony_workflow
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^6.4, MariaDB 10.11.13, State Machine Adapter winzou_state_machine
  • GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.4, Symfony ^7.3, PostgreSQL 17.5
  • GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.3, Symfony ^6.4, PostgreSQL 15.13
  • GitHub Check: Frontend / NodeJS 24.x
  • GitHub Check: Packages / PHP 8.3, Symfony ^6.4
  • GitHub Check: Packages / PHP 8.4, Symfony ^7.3
🔇 Additional comments (31)
src/Sylius/Behat/Service/JQueryHelper.php (1)

23-23: Loading selector updated correctly.

The change from [data-live-loading=true] to [data-live-is-loading] aligns with the broader refactoring in DriverHelper and SymfonyElement to use the standardized LiveComponent loading indicator.

Also applies to: 29-29

src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1)

16-18: Migration to SymfonyElement completed correctly.

The class now extends SymfonyElement, which provides automatic LiveComponent wait support through the overridden getElement() method. All existing calls to getElement() throughout this class will now benefit from the wait logic.

src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1)

16-18: SymfonyElement migration applied correctly.

The inheritance change integrates the LiveComponent wait mechanism into all getElement() calls within this class.

src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1)

16-18: Base class migration successful.

The transition to SymfonyElement is consistent with the refactoring pattern applied across all Behat elements in this PR.

src/Sylius/Behat/Service/DriverHelper.php (1)

37-37: Loading indicator selector updated correctly.

The change to [data-live-is-loading] is consistent with the corresponding updates in JQueryHelper and the wait logic in SymfonyElement, establishing a unified approach to detecting LiveComponent loading states.

src/Sylius/Behat/Element/Admin/NotificationsElement.php (1)

17-20: Element migration completed successfully.

The class now extends SymfonyElement, providing automatic LiveComponent synchronization for all element interactions.

src/Sylius/Behat/Element/Admin/TopBarElement.php (1)

16-18: LGTM! Clean migration to SymfonyElement.

The base class change is correct and consistent with the broader refactoring. The automatic LiveComponent wait support will now apply when retrieving the user avatar element.

src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)

16-18: LGTM! Proper migration with correct parent chaining.

The migration is correct and the getDefinedElements() properly merges parent definitions, ensuring compatibility with the SymfonyElement base class.

src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)

16-18: LGTM! Migration follows the established pattern.

The base class change is correct and maintains backward compatibility while adding LiveComponent wait support.

src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)

16-19: LGTM! Consistent migration to SymfonyElement.

The refactoring correctly updates the base class and import while preserving all existing functionality.

src/Sylius/Behat/Element/Shop/MenuElement.php (1)

17-19: LGTM! Migration aligns with the broader refactoring.

The base class change is correct and will apply automatic LiveComponent waiting to menu element retrieval.

src/Sylius/Behat/Element/SaveElement.php (1)

17-20: LGTM! Migration preserves existing wait logic.

The base class change is correct. The explicit DriverHelper::waitForPageToLoad() calls at lines 26 and 35 remain appropriate as they wait for page transitions after user actions (click/press), which is distinct from the automatic element retrieval waits provided by SymfonyElement.

src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)

16-18: LGTM! Straightforward migration.

The base class change is correct. Note that hasElement() checks don't trigger the automatic wait (only getElement() does), while getElement() at line 29 will benefit from LiveComponent wait support.

src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1)

16-19: LGTM! Migration is correct.

The base class change properly integrates with existing wait logic. The automatic LiveComponent waits from SymfonyElement complement the custom waitForUpdate() method which handles specific busy state transitions.

src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1)

16-18: LGTM! Clean migration to SymfonyElement.

The migration from Element to SymfonyElement is correct and follows the PR's refactoring pattern. The class now automatically benefits from LiveComponent wait logic whenever getElement() is called, improving test reliability.

src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1)

16-18: LGTM! Consistent refactoring to SymfonyElement.

The migration is correctly implemented. All three methods (enable(), disable(), isEnabled()) will now wait for LiveComponents to finish before interacting with elements, improving test stability.

src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)

17-20: LGTM! Migration correctly applied to complex element class.

The refactoring is properly implemented. The class's more complex logic (address type selection, choice iteration) will now benefit from automatic LiveComponent waiting, making the tests more resilient to timing issues.

src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)

16-18: LGTM! Consistent base class migration.

The migration is correct. The searchWith() method will now wait for LiveComponents before setting the search value and pressing the filter button, ensuring the UI is ready for interaction.

src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)

16-18: LGTM! Straightforward migration to SymfonyElement.

The refactoring is correctly applied. The isOptionDefined() method will now wait for LiveComponents before checking option presence, improving test reliability.

src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)

16-18: LGTM! Migration enhances multiple element interactions.

The refactoring is correct. All five shipping-related getters (getProductShippingCategory(), getProductHeight(), getProductDepth(), getProductWeight(), getProductWidth()) will now wait for LiveComponents before retrieving values.

src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1)

16-18: LGTM! Clean refactoring to SymfonyElement.

The migration is correctly implemented. The reset() method will now wait for LiveComponents before clicking the reset button, ensuring the UI is fully loaded.

src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1)

16-18: LGTM! Migration properly applied to cart widget element.

The refactoring is correct. The getCartTotalQuantity() method uses a defensive pattern with hasElement() before getElement(), and the latter will now wait for LiveComponents before retrieving the cart quantity, improving test reliability.

src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)

17-19: Clean migration to SymfonyElement base class.

The inheritance change from Element to SymfonyElement is correct and consistent with the PR's objectives. This element now benefits from automatic LiveComponent wait logic on all getElement() calls.

src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)

16-18: LGTM – consistent migration pattern.

The class correctly extends SymfonyElement and maintains its interface implementation. All public methods will now benefit from the automatic LiveComponent wait logic.

src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1)

16-18: Migration looks good.

The base class change is correct, and the existing isImageDisplayed() method will continue to work as expected since getDocument() and getDriver() are available from the base class hierarchy.

src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)

18-20: Base class migration is correct.

The change to SymfonyElement is consistent with the PR pattern. Note that this class has a local waitForFormUpdate() method (lines 69-75) that also waits for the [busy] attribute, which now overlaps with the global wait in SymfonyElement.getElement(). The local wait is more targeted with specific timing (500ms sleep + 1500ms wait), while the base class waits globally for up to 10 seconds. Both mechanisms should be compatible as they check for absence of the same attribute.

src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1)

16-18: Clean migration to SymfonyElement.

The inheritance change is correct and consistent. All element lookups in this class will now automatically wait for LiveComponents to finish loading.

src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1)

18-20: LGTM – migration follows the standard pattern.

The base class change is appropriate for this element, which deals with pricing data that may be dynamically loaded via LiveComponents. The automatic wait logic will help ensure stable test execution.

src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1)

19-24: Migration is correct.

The class successfully extends SymfonyElement while maintaining its constructor signature and interface implementation. Similar to FormElement, this class has a local waitForFormUpdate() method (lines 120-126) that waits for the [busy] attribute after form updates. This local wait mechanism works in conjunction with the base class's global wait and provides targeted synchronization for LiveComponent form updates.

src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)

17-19: Base class migration looks good.

The change to SymfonyElement is consistent and correct. The element's association-checking logic will now benefit from automatic LiveComponent synchronization.

src/Sylius/Behat/Element/SymfonyElement.php (1)

13-18: LGTM: Clean wrapper pattern for LiveComponent synchronization.

The approach of overriding getElement() to inject wait logic is clean and ensures all element retrievals automatically wait for LiveComponents. This centralized pattern reduces test flakiness.

$session->wait(1000, "!document.querySelector('[data-live-is-loading]')");
}

public static function waitForFormToStopLoading(DocumentElement $document, int $timeout = 10): void
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove unused parameter.

The $timeout parameter is declared but never used in the method body. Either implement timeout logic or remove the parameter.

Apply this diff to remove the unused parameter:

-    public static function waitForFormToStopLoading(DocumentElement $document, int $timeout = 10): void
+    public static function waitForFormToStopLoading(DocumentElement $document): void
🧰 Tools
🪛 PHPMD (2.15.0)

26-26: Avoid unused parameters such as '$timeout'. (undefined)

(UnusedFormalParameter)

🤖 Prompt for AI Agents
In src/Sylius/Behat/Service/JQueryHelper.php around line 26 the method signature
declares an unused parameter $timeout; remove the unused parameter from the
method signature (change waitForFormToStopLoading(DocumentElement $document):
void), update any related docblocks or type hints, and then search the codebase
for all calls to waitForFormToStopLoading and remove the passed timeout argument
(or adjust those calls to the new signature) so there are no mismatched
invocations.

@Rafikooo Rafikooo changed the title [Behat] Refactor elements to use SymfonyElement with LiveComponent support [Behat][DX] Add SyliusElement/SyliusPage base classes Oct 17, 2025
@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from b445cc4 to 0fba90c Compare October 17, 2025 13:24
@Rafikooo Rafikooo changed the title [Behat][DX] Add SyliusElement/SyliusPage base classes [Behat] Fix flaky tests by correcting LiveComponent loading state detection Oct 17, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (1)

27-38: Consider removing redundant wait on line 30.

Since SyliusPage.getElement() now automatically calls DriverHelper::waitForPageToLoad(), the explicit wait on line 30 is redundant—the subsequent getElement() call on line 31 will wait again. Removing the manual wait would eliminate the double-wait without affecting correctness.

Apply this diff to remove the redundant wait:

     public function selectShippingMethod(string $shippingMethod): void
     {
         if (DriverHelper::isJavascript($this->getDriver())) {
-            DriverHelper::waitForPageToLoad($this->getSession());
             $this->getElement('shipping_method_select', ['%shipping_method%' => $shippingMethod])->click();
 
             return;
         }
src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1)

31-31: Add explicit bool return types for state-check helpers.

Align with coding guidelines and intent.

As per coding guidelines

-    public function hasShipmentWithState(string $state);
+    public function hasShipmentWithState(string $state): bool;

-    public function hasPaymentWithState(string $state);
+    public function hasPaymentWithState(string $state): bool;

Also applies to: 41-41

src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (3)

26-34: Type-hint $minkParameters as array.

Matches parent signature and improves static analysis.

-    public function __construct(
+    public function __construct(
         Session $session,
-        $minkParameters,
+        array $minkParameters,
         RouterInterface $router,
         protected readonly TableAccessorInterface $tableAccessor,
         protected readonly string $routeName,
     ) {
         parent::__construct($session, $minkParameters, $router);
     }

57-66: Harden sorting order detection.

Use an explicit asc|desc capture and robust query matching.

-        preg_match('/\?sorting[^=]+\=([acdes]+)/i', $sortingHeader->getAttribute('href'), $matches);
+        preg_match('/[?&]sorting[^=]*=(asc|desc)\b/i', (string) $sortingHeader->getAttribute('href'), $matches);

111-112: Wait for page reload after destructive actions.

Prevents flakiness; mirrors Shop AddressBook delete flow.

Add import at top of the file:

use Sylius\Behat\Service\DriverHelper;

Apply waits after confirms:

     public function deleteResourceOnPage(array $parameters): void
     {
         $tableAccessor = $this->getTableAccessor();
         $table = $this->getElement('table');

         $deletedRow = $tableAccessor->getRowWithFields($table, $parameters);
         $actionButtons = $tableAccessor->getFieldFromRow($table, $deletedRow, 'actions');

-        $actionButtons->find('css', '[data-test-modal="delete"] [data-test-confirm-button]')->press();
+        $actionButtons->find('css', '[data-test-modal="delete"] [data-test-confirm-button]')->press();
+        DriverHelper::waitForPageToLoad($this->getSession());
     }
     public function bulkDelete(): void
     {
         $this->getElement('bulk_actions')->pressButton('Delete');
-        $this->getElement('bulk_delete_confirm_button')->click();
+        $this->getElement('bulk_delete_confirm_button')->click();
+        DriverHelper::waitForPageToLoad($this->getSession());
     }

Also applies to: 142-146

src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (1)

20-20: Consider making the page class final.

Non-entity classes should be final to prevent unintended extension.

As per coding guidelines

-class IndexPage extends SyliusPage implements IndexPageInterface
+final class IndexPage extends SyliusPage implements IndexPageInterface
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41b7c66 and b445cc4.

📒 Files selected for processing (107)
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (2 hunks)
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php (1 hunks)
  • src/Sylius/Behat/Element/BrowserElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1 hunks)
  • src/Sylius/Behat/Element/SaveElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/MenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElementInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php (2 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php (1 hunks)
⛔ Files not processed due to max files limit (35)
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPageInterface.php
  • src/Sylius/Behat/Page/Shop/Page.php
  • src/Sylius/Behat/Page/Shop/PaymentRequest/PaymentRequestNotifyPage.php
  • src/Sylius/Behat/Page/Shop/Product/IndexPage.php
  • src/Sylius/Behat/Page/Shop/ProductReview/IndexPage.php
  • src/Sylius/Behat/Page/SyliusPage.php
  • src/Sylius/Behat/Page/SyliusPageInterface.php
  • src/Sylius/Behat/Page/TestPlugin/MainPage.php
  • src/Sylius/Behat/Page/TestPlugin/MainPageInterface.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolver.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolverInterface.php
  • src/Sylius/Behat/tests/Service/Resolver/CurrentPageResolverTest.php
  • src/Sylius/Bundle/UserBundle/tests/Authentication/AuthenticationFailureHandlerTest.php
  • tests/Api/Admin/ChannelsTest.php
  • tests/Api/Admin/OrdersTest.php
  • tests/Api/Admin/ProductReviewsTest.php
  • tests/Api/Admin/StatisticsTest.php
  • tests/Api/Shop/PaymentRequestsTest.php
  • tests/Api/Shop/ProductsTest.php
  • tests/Controller/XFrameOptionsTest.php
  • tests/Functional/AbstractOrmTestCase.php
  • tests/Functional/AdminSectionNotFoundPageTest.php
  • tests/Functional/Bundles/LocaleBundle/Context/LocaleResolvingTest.php
  • tests/Functional/CartCollectorTest.php
  • tests/Functional/CatalogPromotionAnnouncerTest.php
  • tests/Functional/CatalogPromotionRemovalAnnouncerTest.php
  • tests/Functional/Doctrine/Dump/CompositeKeysModel.php
  • tests/Functional/Doctrine/Dump/Model.php
  • tests/Functional/EligibleCatalogPromotionsProcessorTest.php
  • tests/Functional/Encryption/GatewayConfigEncryptionTest.php
  • tests/Functional/Encryption/PaymentRequestEncryptionTest.php
  • tests/Functional/OrderByIdentifierSqlWalkerTest.php
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,yaml,yml,xml,twig}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation in PHP, YAML, XML, and Twig files

Files:

  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Element/SyliusElementInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php
  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
**/*.php

📄 CodeRabbit inference engine (AGENTS.md)

**/*.php: Use modern PHP 8.2+ syntax and features
Declare strict_types=1 in all PHP files
Follow the Sylius Coding Standard
Do not use deprecated features from PHP, Symfony, or Sylius
Use final for all classes, except entities and repositories
Use readonly for immutable services and value objects
Add type declarations for all properties, arguments, and return values
Use camelCase for variables and method names
Use SCREAMING_SNAKE_CASE for constants
Use fast returns instead of unnecessary nesting
Use trailing commas in multi-line arrays and argument lists
Order array keys alphabetically where applicable
Use PHPDoc only when necessary (e.g., @var Collection)
Group class elements in order: constants, properties, constructor, public, protected, private methods
Group getter and setter methods for the same properties together
Suffix interfaces with Interface and traits with Trait
Use use statements for all non-global classes
Sort use imports alphabetically and group by type (classes, functions, constants)

Files:

  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Element/SyliusElementInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php
  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
🧬 Code graph analysis (83)
src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (3)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Component/Core/Formatter/StringInflector.php (1)
  • StringInflector (19-61)
src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (2)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/RegisterPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (4)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Shop/MenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Order/ShowPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/SyliusElement.php (1)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Account/LoginPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/SaveElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/BrowserElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/DashboardPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (3)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1)
  • FilterElement (18-43)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
  • FilterElement (18-45)
src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (3)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)
  • FilterElement (19-76)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
  • FilterElement (18-45)
src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (4)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Page/Shop/HomePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Packages / Get matrix

@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from 0fba90c to 2c5c352 Compare October 17, 2025 14:16
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (1)

128-136: Ensure non-null return or throw ElementNotFoundException.

Current loop may return null, violating the return type and causing fatal errors.

     protected function getFieldElement(string $element): NodeElement
     {
         $element = $this->getElement(StringInflector::nameToCode($element));
-        while (null !== $element && !$element->hasClass('field')) {
+        while (null !== $element && !$element->hasClass('field')) {
             $element = $element->getParent();
         }
-
-        return $element;
+        if (null === $element) {
+            throw new ElementNotFoundException($this->getSession(), 'Field element with class "field"');
+        }
+        return $element;
     }
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1)

35-35: Remove the explicit wait at line 35; waitForUpdate() is necessary and should be retained.

The explicit DriverHelper::waitForPageToLoad() call at line 35 is redundant. SyliusElement::getElement() already calls waitForLiveComponentToFinish(), which waits up to 10 seconds for document ready, no loading indicators, and no busy elements—more comprehensive than the 1-second explicit wait.

However, the waitForUpdate() logic (lines 101-108) is not redundant. The sleep(1) and subsequent waitFor() check serve a different purpose: they wait for the LiveComponent to start its update cycle (set the busy attribute), then verify completion. The explicit code comment confirms this is intentional to avoid race conditions where the update hasn't begun yet when getElement() returns.

Action: Remove line 35. Keep waitForUpdate() as-is.

🧹 Nitpick comments (17)
src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1)

18-18: Consider marking the class as final per coding guidelines.

The coding guidelines specify that all classes should be marked final, except entities and repositories. Since VerificationPage is a Behat page object, it should be marked as final to prevent unintended inheritance and improve code maintainability.

Apply this diff:

-class VerificationPage extends SyliusPage implements VerificationPageInterface
+final class VerificationPage extends SyliusPage implements VerificationPageInterface
src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (1)

20-20: Consider making the class final per coding guidelines.

The coding guidelines specify that all classes should be final except entities and repositories. This Behat page class could be declared final to prevent unintended inheritance and improve maintainability.

Apply this diff to make the class final:

-class ProfileUpdatePage extends SyliusPage implements ProfileUpdatePageInterface
+final class ProfileUpdatePage extends SyliusPage implements ProfileUpdatePageInterface

As per coding guidelines

src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1)

29-31: Consider removing the redundant wait.

Since SyliusPage::getElement() now automatically calls DriverHelper::waitForPageToLoad() (line 31), the explicit wait on line 30 is redundant and adds unnecessary delay.

Apply this diff to remove the redundant wait:

     public function selectPaymentMethod(string $paymentMethod): void
     {
         if (DriverHelper::isJavascript($this->getDriver())) {
-            DriverHelper::waitForPageToLoad($this->getSession());
             $this->getElement('payment_method_select', ['%payment_method%' => $paymentMethod])->click();
 
             return;
src/Sylius/Behat/Page/Shop/Account/LoginPage.php (3)

24-34: Make the page object final and mark DI as readonly.

Improves immutability and follows the coding guidelines.

-class LoginPage extends SyliusPage implements LoginPageInterface
+final class LoginPage extends SyliusPage implements LoginPageInterface
@@
-        protected TableAccessorInterface $tableAccessor,
-        private SharedStorageInterface $sharedStorage,
+        protected readonly TableAccessorInterface $tableAccessor,
+        private readonly SharedStorageInterface $sharedStorage,

43-46: Trim or loosen the equality check for validation messages.

Avoid brittle failures due to whitespace/formatting differences.

-    public function hasValidationErrorWith(string $message): bool
-    {
-        return $this->getElement('flash_message')->getText() === $message;
-    }
+    public function hasValidationErrorWith(string $message): bool
+    {
+        $text = trim($this->getElement('flash_message')->getText());
+        return $text === trim($message);
+        // or: return str_contains($text, $message);
+    }

28-34: Is TableAccessor needed here?

It’s injected but unused in this class. If not required by parent/trait, consider removing to reduce surface area.

src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (3)

18-19: Make the element final.

Follows the guideline to mark non-entity classes final.

-class AttributesElement extends SyliusElement implements AttributesElementInterface
+final class AttributesElement extends SyliusElement implements AttributesElementInterface

20-25: Avoid double getText() calls.

Micro-optimization/readability.

-        $attributeValue = $this->getElement('attribute_with_locale', ['%locale_code%' => $localeCode]);
-
-        return str_contains($attributeValue->getText(), $value) && str_contains($attributeValue->getText(), $attribute);
+        $attributeValue = $this->getElement('attribute_with_locale', ['%locale_code%' => $localeCode]);
+        $text = $attributeValue->getText();
+        return str_contains($text, $value) && str_contains($text, $attribute);

27-34: Cast values once before building CSS attribute selectors.

Prevents implicit conversions and makes intent explicit.

-        $attributeElement = $this->getElement('non_translatable-attribute');
-        $hasName = $attributeElement->has('css', sprintf('[data-test-non-translatable-attribute-name="%s"]', $attribute));
-        $hasValue = $attributeElement->has('css', sprintf('[data-test-non-translatable-attribute-value="%s"]', $value));
+        $attributeElement = $this->getElement('non_translatable-attribute');
+        $name = (string) $attribute;
+        $valueStr = (string) $value;
+        $hasName = $attributeElement->has('css', sprintf('[data-test-non-translatable-attribute-name="%s"]', $name));
+        $hasValue = $attributeElement->has('css', sprintf('[data-test-non-translatable-attribute-value="%s"]', $valueStr));
src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (2)

26-33: Mark UpdatePage as final.

Conforms to project guidelines for non-entity classes.

-class UpdatePage extends SyliusPage implements UpdatePageInterface
+final class UpdatePage extends SyliusPage implements UpdatePageInterface

98-105: Use usleep for shorter backoff; keep wait focused on 'busy'.

Reduces fixed delay and aligns with similar code using 500ms.

-        $form = $this->getElement('form');
-        sleep(1); // we need to sleep, as sometimes the check below is executed faster than the form sets the busy attribute
-        $form->waitFor(1500, function () use ($form) {
-            return !$form->hasAttribute('busy');
-        });
+        $form = $this->getElement('form');
+        usleep(500_000); // small backoff to allow 'busy' to appear
+        $form->waitFor(1500, static fn () => !$form->hasAttribute('busy'));
src/Sylius/Behat/Element/SaveElement.php (3)

19-19: Make the element final.

Non-entity classes should be final.

-class SaveElement extends SyliusElement implements SaveElementInterface
+final class SaveElement extends SyliusElement implements SaveElementInterface

21-35: Standardize waits on LiveComponent selectors with 5s timeout.

Keep behavior consistent with central wait strategy.

After updating DriverHelper::waitForPageToLoad as suggested earlier, no changes needed here. If you prefer local waits in elements, replace both waits with a single call to DriverHelper (or extract a shared helper) to avoid duplicated logic.


37-43: Minor: keep element map alphabetized for readability.

Optional, but helps scanning long maps.

         return array_merge(parent::getDefinedElements(), [
-            'save_changes_button' => '[data-test-button="save-changes"]',
-            'update_changes_button' => '[data-test-update-changes-button]',
+            'save_changes_button' => '[data-test-button="save-changes"]',
+            'update_changes_button' => '[data-test-update-changes-button]',
         ]);
src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (2)

18-18: Mark the element class final

Per coding guidelines, non-entity classes should be final.

-class TranslationsElement extends SyliusElement implements TranslationsElementInterface
+final class TranslationsElement extends SyliusElement implements TranslationsElementInterface

50-60: Add trailing comma in multi-line array

Small CS nit: multi-line arrays should end with a trailing comma.

         return array_merge(parent::getDefinedElements(), [
             'description' => '#product-translations [data-test-description]',
             'meta_description' => '#product-translations [data-test-meta-description]',
             'meta_keywords' => '#product-translations [data-test-meta-keywords]',
             'name' => '#product-translations [data-test-product-name]',
             'short_description' => '#product-translations [data-test-short-description]',
-            'slug' => '#product-translations [data-test-slug]',
+            'slug' => '#product-translations [data-test-slug]',
         ]);
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1)

18-18: Make the page class final

Per project CS, non-entity classes should be final.

-class WellKnownPasswordChangePage extends SyliusPage implements WellKnownPasswordChangePageInterface
+final class WellKnownPasswordChangePage extends SyliusPage implements WellKnownPasswordChangePageInterface
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b445cc4 and 2c5c352.

📒 Files selected for processing (107)
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (2 hunks)
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php (1 hunks)
  • src/Sylius/Behat/Element/BrowserElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1 hunks)
  • src/Sylius/Behat/Element/SaveElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/MenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElementInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php (2 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php (1 hunks)
⛔ Files not processed due to max files limit (16)
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPageInterface.php
  • src/Sylius/Behat/Page/Shop/Page.php
  • src/Sylius/Behat/Page/Shop/PaymentRequest/PaymentRequestNotifyPage.php
  • src/Sylius/Behat/Page/Shop/Product/IndexPage.php
  • src/Sylius/Behat/Page/Shop/ProductReview/IndexPage.php
  • src/Sylius/Behat/Page/SyliusPage.php
  • src/Sylius/Behat/Page/SyliusPageInterface.php
  • src/Sylius/Behat/Page/TestPlugin/MainPage.php
  • src/Sylius/Behat/Page/TestPlugin/MainPageInterface.php
  • src/Sylius/Behat/Service/DriverHelper.php
  • src/Sylius/Behat/Service/JQueryHelper.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolver.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolverInterface.php
🚧 Files skipped from review as they are similar to previous changes (51)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Element/SyliusElementInterface.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php
  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,yaml,yml,xml,twig}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation in PHP, YAML, XML, and Twig files

Files:

  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
**/*.php

📄 CodeRabbit inference engine (AGENTS.md)

**/*.php: Use modern PHP 8.2+ syntax and features
Declare strict_types=1 in all PHP files
Follow the Sylius Coding Standard
Do not use deprecated features from PHP, Symfony, or Sylius
Use final for all classes, except entities and repositories
Use readonly for immutable services and value objects
Add type declarations for all properties, arguments, and return values
Use camelCase for variables and method names
Use SCREAMING_SNAKE_CASE for constants
Use fast returns instead of unnecessary nesting
Use trailing commas in multi-line arrays and argument lists
Order array keys alphabetically where applicable
Use PHPDoc only when necessary (e.g., @var Collection)
Group class elements in order: constants, properties, constructor, public, protected, private methods
Group getter and setter methods for the same properties together
Suffix interfaces with Interface and traits with Trait
Use use statements for all non-global classes
Sort use imports alphabetically and group by type (classes, functions, constants)

Files:

  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
🧬 Code graph analysis (53)
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1)
  • RequestPasswordResetPage (19-57)
src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/SaveElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1)
  • ResetPasswordPage (23-80)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1)
  • ResetPasswordPage (23-74)
src/Sylius/Behat/Page/Shop/Account/LoginPage.php (4)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1)
  • LoginPage (22-66)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (2)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Shop/MenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/SyliusElement.php (2)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • getElement (22-27)
src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (7)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3

@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from 2c5c352 to 310daa9 Compare October 20, 2025 12:45
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1)

20-30: Remove the hasElement() guard or add explicit waiting before it, as it creates a race condition with LiveComponent loading.

The hasElement() call (line 22) does not trigger waitForLiveComponentToFinish() because hasElement() is inherited from Behat's BaseElement and is not overridden in SyliusElement. Only getElement() triggers the wait logic. If cart_quantity is a LiveComponent, hasElement() may return false while the component is still loading, causing an early return of 0 instead of waiting for the element to appear—exactly the race condition this PR aims to fix.

Options:

  1. Remove the hasElement() guard and catch the exception if the element is truly missing, or
  2. Call getElement() directly and let the built-in waiting handle both the wait and the fetch, or
  3. Add an explicit waitForLiveComponentToFinish() call before the hasElement() check if the guard is semantically necessary.

Timeout note: The actual timeout in SyliusElement::waitForLiveComponentToFinish() is 10 seconds (line 39), not the "5s max timeout" stated in the PR description.

♻️ Duplicate comments (1)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1)

16-18: Parent class migration looks consistent.

The change from SymfonyPage to SyliusPage aligns with the PR's renaming effort. The class correctly implements WellKnownPasswordChangePageInterface which now also extends SyliusPageInterface.

Note: The timeout/selector inconsistency between DriverHelper::waitForPageToLoad() (1000ms, checks only [data-live-is-loading]) and SyliusElement::waitForLiveComponentToFinish() (10000ms, checks both selectors) flagged in the previous review remains applicable to this class since it inherits SyliusPage::getElement() which uses DriverHelper.

🧹 Nitpick comments (9)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1)

19-19: Consider marking the class as final per coding guidelines.

Per the Sylius Coding Standard guideline, classes should be final except for entities and repositories. This Page class should be marked final.

Apply this diff:

-class RequestPasswordResetPage extends SyliusPage implements RequestPasswordResetPageInterface
+final class RequestPasswordResetPage extends SyliusPage implements RequestPasswordResetPageInterface

As per coding guidelines.

src/Sylius/Behat/Page/Shop/HomePage.php (1)

18-20: LGTM! Base class migration correctly implements automatic LiveComponent waiting.

The change from SymfonyPage to SyliusPage is correct and directly addresses the PR objective. The new base class adds DriverHelper::waitForPageToLoad() before every getElement() call, which will automatically wait for LiveComponents to finish loading. This should eliminate the flaky test failures caused by interaction with elements while LiveComponents are still loading.

All existing getElement() calls throughout this class (lines 34, 44, 45, 53, 60, 67, 71, 76, 83, 89, 94, 99, 120) will benefit from this automatic wait logic.

As a nice-to-have future improvement, consider marking this class as final to align with the coding guideline: "Use final for all classes, except entities and repositories." Since this is a Page Object (not an entity or repository), it should be final:

-class HomePage extends SyliusPage implements HomePageInterface
+final class HomePage extends SyliusPage implements HomePageInterface
src/Sylius/Behat/Element/SaveElement.php (1)

19-19: Base class change looks good; consider making the class final.

The migration from Element to SyliusElement correctly aligns with the PR objectives to fix flaky tests through proper LiveComponent loading detection. The automatic wait logic in SyliusElement::getElement() will now ensure LiveComponents finish loading before element interactions.

However, per the coding guidelines, this class should be declared as final (all classes except entities and repositories should be final). If this element is intentionally designed to be extended by projects using Sylius, document that decision; otherwise, add the final keyword.

Apply this diff to make the class final:

-class SaveElement extends SyliusElement implements SaveElementInterface
+final class SaveElement extends SyliusElement implements SaveElementInterface
src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1)

40-43: Verify and optionally add explicit wait to Admin LoginPage for consistency with Shop.

The shop LoginPage::logIn() explicitly calls DriverHelper::waitForPageToLoad() after the button click, while the admin version does not. Since the admin implementation uses getDocument()->pressButton() rather than getElement(), it won't benefit from the auto-wait logic. Tests that interact with the page immediately after login could encounter race conditions. Consider adding the explicit wait call for consistency.

src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)

16-18: Make the element class final; also confirm SyliusElement wait timeout (5s vs 10s).

  • Marking Behat elements final aligns with our coding standard and prevents unintended inheritance.
  • PR text mentions a 5s max timeout, while SyliusElement::waitForLiveComponentToFinish() waits 10s; please confirm intended value and align code/docs.

Apply:

-use Sylius\Behat\Element\SyliusElement;
+use Sylius\Behat\Element\SyliusElement;

-class TaxonomyElement extends SyliusElement implements TaxonomyElementInterface
+final class TaxonomyElement extends SyliusElement implements TaxonomyElementInterface
src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)

18-19: Seal the element class.

Mark as final to match our standard for non-entity/test elements.

-class SearchFilterElement extends SyliusElement implements SearchFilterElementInterface
+final class SearchFilterElement extends SyliusElement implements SearchFilterElementInterface
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)

18-19: Final class + replace non-standard :contains selectors with text checks.

  • Make class final (consistency).
  • CSS :contains is not standard and may break on non-JS drivers; prefer selecting the element and asserting its text.

Apply:

-use Sylius\Behat\Element\SyliusElement;
+use Sylius\Behat\Element\SyliusElement;

-class LowestPriceInformationElement extends SyliusElement implements LowestPriceInformationElementInterface
+final class LowestPriceInformationElement extends SyliusElement implements LowestPriceInformationElementInterface
@@
-    public function isThereInformationAboutProductLowestPriceWithPrice(string $lowestPriceBeforeDiscount): bool
-    {
-        return $this->hasElement('lowest_price_information_element_with_price', [
-            '%lowestPriceBeforeDiscount%' => $lowestPriceBeforeDiscount,
-        ]);
-    }
+    public function isThereInformationAboutProductLowestPriceWithPrice(string $lowestPriceBeforeDiscount): bool
+    {
+        if (!$this->hasElement('lowest_price_information_element')) {
+            return false;
+        }
+
+        return str_contains(
+            $this->getElement('lowest_price_information_element')->getText(),
+            $lowestPriceBeforeDiscount,
+        );
+    }
@@
-        return array_merge(parent::getDefinedElements(), [
-            'lowest_price_information_element' => '[data-test-lowest-price-before-discount]:contains("The lowest price of this product from")',
-            'lowest_price_information_element_with_price' => '[data-test-lowest-price-before-discount]:contains("%lowestPriceBeforeDiscount%")',
-        ]);
+        return array_merge(parent::getDefinedElements(), [
+            'lowest_price_information_element' => '[data-test-lowest-price-before-discount]',
+        ]);

Also applies to: 32-37, 20-25

src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)

20-20: Final class + drop fixed sleep in favor of a short spin on busy.

  • Seal class with final.
  • Avoid unconditional 500ms sleep; first wait briefly for busy to appear, then for it to clear.
-class FormElement extends SyliusElement implements FormElementInterface
+final class FormElement extends SyliusElement implements FormElementInterface
@@
     protected function waitForFormUpdate(): void
     {
         $form = $this->getElement('form');
-
-        usleep(500000); // we need to sleep, as sometimes the check below is executed faster than the form sets the busy attribute
-        $form->waitFor(1500, fn () => !$form->hasAttribute('busy'));
+        // Wait briefly for the form to enter busy state, then for it to settle
+        $form->waitFor(300, fn () => $form->hasAttribute('busy'));
+        $form->waitFor(1500, fn () => !$form->hasAttribute('busy'));
     }

Also applies to: 69-75

src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)

20-25: Make class final and constants private; consider i18n-safety of label parsing.

  • This element isn’t intended for extension; prefer final + private consts.
  • Parsing labels by text may break with translations; consider matching by input value/id or data-test attributes.
-class ShippingAddressInCheckoutRequiredElement extends SyliusElement implements ShippingAddressInCheckoutRequiredElementInterface
+final class ShippingAddressInCheckoutRequiredElement extends SyliusElement implements ShippingAddressInCheckoutRequiredElementInterface
 {
-    protected const ADDRESS_TYPE_BILLING = 'billing';
-    protected const ADDRESS_TYPE_SHIPPING = 'shipping';
+    private const ADDRESS_TYPE_BILLING = 'billing';
+    private const ADDRESS_TYPE_SHIPPING = 'shipping';
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c5c352 and 310daa9.

📒 Files selected for processing (107)
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (2 hunks)
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php (1 hunks)
  • src/Sylius/Behat/Element/BrowserElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1 hunks)
  • src/Sylius/Behat/Element/SaveElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/MenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElementInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php (2 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php (1 hunks)
⛔ Files not processed due to max files limit (16)
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPageInterface.php
  • src/Sylius/Behat/Page/Shop/Page.php
  • src/Sylius/Behat/Page/Shop/PaymentRequest/PaymentRequestNotifyPage.php
  • src/Sylius/Behat/Page/Shop/Product/IndexPage.php
  • src/Sylius/Behat/Page/Shop/ProductReview/IndexPage.php
  • src/Sylius/Behat/Page/SyliusPage.php
  • src/Sylius/Behat/Page/SyliusPageInterface.php
  • src/Sylius/Behat/Page/TestPlugin/MainPage.php
  • src/Sylius/Behat/Page/TestPlugin/MainPageInterface.php
  • src/Sylius/Behat/Service/DriverHelper.php
  • src/Sylius/Behat/Service/JQueryHelper.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolver.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolverInterface.php
🚧 Files skipped from review as they are similar to previous changes (49)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Admin/DashboardPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,yaml,yml,xml,twig}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation in PHP, YAML, XML, and Twig files

Files:

  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Element/SyliusElementInterface.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
**/*.php

📄 CodeRabbit inference engine (AGENTS.md)

**/*.php: Use modern PHP 8.2+ syntax and features
Declare strict_types=1 in all PHP files
Follow the Sylius Coding Standard
Do not use deprecated features from PHP, Symfony, or Sylius
Use final for all classes, except entities and repositories
Use readonly for immutable services and value objects
Add type declarations for all properties, arguments, and return values
Use camelCase for variables and method names
Use SCREAMING_SNAKE_CASE for constants
Use fast returns instead of unnecessary nesting
Use trailing commas in multi-line arrays and argument lists
Order array keys alphabetically where applicable
Use PHPDoc only when necessary (e.g., @var Collection)
Group class elements in order: constants, properties, constructor, public, protected, private methods
Group getter and setter methods for the same properties together
Suffix interfaces with Interface and traits with Trait
Use use statements for all non-global classes
Sort use imports alphabetically and group by type (classes, functions, constants)

Files:

  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Element/SyliusElementInterface.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
🧬 Code graph analysis (53)
src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (1)
  • CreatePage (25-126)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (7)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/NotificationsElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/LoginPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/LoginPage.php (1)
  • LoginPage (24-74)
src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1)
  • ResetPasswordPage (23-80)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (3)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)
  • FilterElement (19-76)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1)
  • FilterElement (18-45)
src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Element/SaveElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1)
  • RequestPasswordResetPage (19-48)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (7)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/SyliusElement.php (2)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • getElement (22-27)
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/DashboardPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/HomePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1)
  • FilterElement (19-76)
src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (3)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1)
  • IndexPage (24-222)
src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Frontend / NodeJS 24.x
  • GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.4, Symfony ^7.3, PostgreSQL 17.5
  • GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.3, Symfony ^6.4, PostgreSQL 15.13
  • GitHub Check: Packages / PHP 8.3, Symfony ^6.4
  • GitHub Check: Packages / PHP 8.4, Symfony ^7.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.4, Symfony ^7.3 (test_cached), MySQL 8.4, Twig ^3.3
  • GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.3, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^6.4, MariaDB 10.11.13, State Machine Adapter winzou_state_machine
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.4, Symfony ^7.3, MariaDB 11.4.7, State Machine Adapter symfony_workflow
  • GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.4, Symfony ^7.3, MariaDB 11.4.7, State Machine Adapter symfony_workflow, ApiPlatform ~4.1.7

@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from 310daa9 to 64d45ed Compare October 20, 2025 13:01
@Rafikooo Rafikooo force-pushed the refactor/behat-symfony-element branch from 64d45ed to 1feb809 Compare October 21, 2025 09:28
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (8)
src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1)

16-18: LGTM! Migration to SyliusPage correctly implemented.

The import and class extension changes properly migrate to the new SyliusPage base class. This automatically inherits the LiveComponent synchronization logic (DriverHelper::waitForPageToLoad() in getElement()), which addresses the flaky test issues described in the PR objectives.

Optional: Consider adding final keyword.

Per the coding guidelines, concrete classes should be marked final (except entities and repositories). Since this is a leaf Behat page class with no expected subclasses, consider:

-class ImpersonateUserPage extends SyliusPage implements ImpersonateUserPageInterface
+final class ImpersonateUserPage extends SyliusPage implements ImpersonateUserPageInterface

As per coding guidelines.

src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1)

18-65: Consider marking the class as final if not extended.

Per the Sylius Coding Standard, classes should be marked final except for entities and repositories. If DashboardPage is not extended by other classes in the test suite, consider making it final.

Apply this diff if the class is not extended elsewhere:

-class DashboardPage extends SyliusPage implements DashboardPageInterface
+final class DashboardPage extends SyliusPage implements DashboardPageInterface

As per coding guidelines.

src/Sylius/Behat/Page/Shop/Order/ShowPage.php (1)

52-58: Consider removing redundant wait call.

Since SyliusPage::getElement() now automatically calls DriverHelper::waitForPageToLoad() before retrieving elements, the explicit wait on line 54 is redundant—line 56's getElement() invocation will wait again.

Apply this diff to remove the redundant wait:

 public function choosePaymentMethod(string $paymentMethodName): void
 {
-    DriverHelper::waitForPageToLoad($this->getSession());
-
     $paymentMethodElement = $this->getElement('payment_method', ['%name%' => $paymentMethodName]);
     $paymentMethodElement->selectOption($paymentMethodElement->getAttribute('value'));
 }
src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1)

342-347: Consider removing redundant wait call.

The explicit wait on line 344 is redundant because getElement() on line 346 will automatically invoke DriverHelper::waitForPageToLoad() via the SyliusPage override.

Apply this diff to remove the redundant wait:

 public function getOrderCurrency(): string
 {
-    DriverHelper::waitForPageToLoad($this->getSession());
-
     return $this->getElement('currency')->getText();
 }
src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1)

16-19: Good base-class switch; optional hardening.

Now inherits the LiveComponent wait via SyliusElement. Consider marking the class final per coding standard for non-entity/repository classes.

-class LowestPriceFlagElement extends SyliusElement implements LowestPriceFlagElementInterface
+final class LowestPriceFlagElement extends SyliusElement implements LowestPriceFlagElementInterface
src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)

69-75: Avoid fixed sleep; wait for busy to appear then clear.

Eliminate the 500ms usleep to reduce flakiness and speed up the happy path.

 protected function waitForFormUpdate(): void
 {
     $form = $this->getElement('form');
-
-    usleep(500000); // we need to sleep, as sometimes the check below is executed faster than the form sets the busy attribute
-    $form->waitFor(1500, fn () => !$form->hasAttribute('busy'));
+    // First, wait briefly for the LiveComponent to mark the form as busy (if it will)
+    $form->waitFor(3000, fn () => $form->hasAttribute('busy'));
+    // Then wait until it is no longer busy
+    $form->waitFor(7000, fn () => !$form->hasAttribute('busy'));
 }
src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)

49-52: Replace CSS :contains with XPath to avoid driver inconsistencies.

:contains() isn’t standard CSS; XPath is more portable across Mink drivers.

-        return $associations->findAll(
-            'css',
-            sprintf("div:contains('%s') ul li", $name),
-        );
+        return $associations->findAll(
+            'xpath',
+            sprintf(".//div[contains(normalize-space(.), '%s')]//ul/li", $name),
+        );
src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1)

16-19: Migration OK; consider final.

Using SyliusElement is correct. Optionally make the class final per coding standard.

-class ResetElement extends SyliusElement implements ResetElementInterface
+final class ResetElement extends SyliusElement implements ResetElementInterface
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 310daa9 and 1feb809.

📒 Files selected for processing (107)
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (2 hunks)
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (2 hunks)
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1 hunks)
  • src/Sylius/Behat/Element/Admin/TopBarElement.php (1 hunks)
  • src/Sylius/Behat/Element/BrowserElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1 hunks)
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1 hunks)
  • src/Sylius/Behat/Element/SaveElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php (1 hunks)
  • src/Sylius/Behat/Element/Shop/MenuElement.php (1 hunks)
  • src/Sylius/Behat/Element/SyliusElement.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php (2 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePage.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php (1 hunks)
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php (1 hunks)
⛔ Files not processed due to max files limit (16)
  • src/Sylius/Behat/Page/Shop/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPage.php
  • src/Sylius/Behat/Page/Shop/Order/ThankYouPageInterface.php
  • src/Sylius/Behat/Page/Shop/Page.php
  • src/Sylius/Behat/Page/Shop/PaymentRequest/PaymentRequestNotifyPage.php
  • src/Sylius/Behat/Page/Shop/Product/IndexPage.php
  • src/Sylius/Behat/Page/Shop/ProductReview/IndexPage.php
  • src/Sylius/Behat/Page/SyliusPage.php
  • src/Sylius/Behat/Page/SyliusPageInterface.php
  • src/Sylius/Behat/Page/TestPlugin/MainPage.php
  • src/Sylius/Behat/Page/TestPlugin/MainPageInterface.php
  • src/Sylius/Behat/Service/DriverHelper.php
  • src/Sylius/Behat/Service/JQueryHelper.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolver.php
  • src/Sylius/Behat/Service/Resolver/CurrentPageResolverInterface.php
  • src/Sylius/Behat/tests/Service/Resolver/CurrentPageResolverTest.php
🚧 Files skipped from review as they are similar to previous changes (59)
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePage.php
  • src/Sylius/Behat/Element/BrowserElement.php
  • src/Sylius/Behat/Element/SaveElement.php
  • src/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.php
  • src/Sylius/Behat/Element/Admin/Taxon/TreeElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/DetailsElement.php
  • src/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPage.php
  • src/Sylius/Behat/Page/Admin/Customer/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePage.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/PricingElement.php
  • src/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.php
  • src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Element/Admin/TaxRate/FilterElement.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPage.php
  • src/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.php
  • src/Sylius/Behat/Page/Admin/DashboardPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.php
  • src/Sylius/Behat/Element/Product/ShowPage/AttributesElement.php
  • src/Sylius/Behat/Page/Admin/DashboardPage.php
  • src/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.php
  • src/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.php
  • src/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.php
  • src/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.php
  • src/Sylius/Behat/Element/Shop/CartWidgetElement.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.php
  • src/Sylius/Behat/Page/Shop/Account/Order/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Checkout/CompletePage.php
  • src/Sylius/Behat/Element/Product/ShowPage/MediaElement.php
  • src/Sylius/Behat/Page/Admin/Product/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPage.php
  • src/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.php
  • src/Sylius/Behat/Page/Shop/HomePageInterface.php
  • src/Sylius/Behat/Element/Shop/Account/RegisterElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php
  • src/Sylius/Behat/Page/Shop/HomePage.php
  • src/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.php
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,yaml,yml,xml,twig}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation in PHP, YAML, XML, and Twig files

Files:

  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
**/*.php

📄 CodeRabbit inference engine (AGENTS.md)

**/*.php: Use modern PHP 8.2+ syntax and features
Declare strict_types=1 in all PHP files
Follow the Sylius Coding Standard
Do not use deprecated features from PHP, Symfony, or Sylius
Use final for all classes, except entities and repositories
Use readonly for immutable services and value objects
Add type declarations for all properties, arguments, and return values
Use camelCase for variables and method names
Use SCREAMING_SNAKE_CASE for constants
Use fast returns instead of unnecessary nesting
Use trailing commas in multi-line arrays and argument lists
Order array keys alphabetically where applicable
Use PHPDoc only when necessary (e.g., @var Collection)
Group class elements in order: constants, properties, constructor, public, protected, private methods
Group getter and setter methods for the same properties together
Suffix interfaces with Interface and traits with Trait
Use use statements for all non-global classes
Sort use imports alphabetically and group by type (classes, functions, constants)

Files:

  • src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php
  • src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php
  • src/Sylius/Behat/Page/Shop/Account/DashboardPage.php
  • src/Sylius/Behat/Element/Admin/Crud/FormElement.php
  • src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php
  • src/Sylius/Behat/Element/Admin/Account/ResetElement.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php
  • src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php
  • src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php
  • src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPage.php
  • src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php
  • src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php
  • src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Order/ShowPage.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php
  • src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php
  • src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php
  • src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php
  • src/Sylius/Behat/Element/Admin/TopBarElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php
  • src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php
  • src/Sylius/Behat/Page/Admin/Crud/IndexPage.php
  • src/Sylius/Behat/Element/SyliusElement.php
  • src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php
  • src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php
  • src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php
  • src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php
  • src/Sylius/Behat/Element/Admin/NotificationsElement.php
  • src/Sylius/Behat/Page/Admin/Order/ShowPage.php
  • src/Sylius/Behat/Page/Admin/Order/HistoryPage.php
  • src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php
  • src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php
  • src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php
  • src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php
  • src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php
  • src/Sylius/Behat/Element/Shop/MenuElement.php
🧬 Code graph analysis (46)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.php (1)
  • RequestPasswordResetPage (19-57)
src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.php (1)
  • ResetPasswordPage (23-80)
src/Sylius/Behat/Element/Admin/Account/ResetElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (3)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (3)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Page/Shop/Order/ShowPage.php (2)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (1)
  • resolveCurrentPage (407-410)
src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/TopBarElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/SyliusElement.php (2)
src/Sylius/Behat/Service/DriverHelper.php (2)
  • DriverHelper (22-40)
  • isJavascript (24-27)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • getElement (22-27)
src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (8)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (1)
  • resolveCurrentPage (1200-1203)
src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)
  • resolveCurrentPage (725-728)
src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (1)
  • resolveCurrentPage (471-474)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (1)
  • resolveCurrentPage (807-810)
src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)
  • resolveCurrentPage (962-965)
src/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.php (1)
  • resolveCurrentPage (221-224)
src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)
  • resolveCurrentPage (58-58)
src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/NotificationsElement.php (2)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Service/DriverHelper.php (1)
  • DriverHelper (22-40)
src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (2)
src/Sylius/Behat/Page/Shop/Page.php (1)
  • Page (20-65)
src/Sylius/Behat/Page/SyliusPage.php (1)
  • SyliusPage (20-33)
src/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
src/Sylius/Behat/Element/Shop/MenuElement.php (1)
src/Sylius/Behat/Element/SyliusElement.php (1)
  • SyliusElement (20-46)
🔇 Additional comments (50)
src/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.php (1)

17-17: LGTM! Interface rename is consistent and aligns with PR objectives.

The migration from SymfonyPageInterface to SyliusPageInterface is correctly applied across the import statement (line 17), PHPDoc annotation (line 56), and method signature (line 58). This change is consistent with the broader refactoring effort to rename base classes from "Symfony*" to "Sylius*" naming, and aligns with usage in other contexts shown in the relevant code snippets.

Also applies to: 56-58

src/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.php (1)

17-19: LGTM! Clean refactoring to internal Sylius base interface.

The change correctly updates the parent interface from SymfonyPageInterface to SyliusPageInterface, maintaining the interface contract while aligning with the PR's systematic refactoring to use internal Sylius base classes that support LiveComponent synchronization.

src/Sylius/Behat/Page/Admin/Shipment/ShowPage.php (1)

16-18: LGTM! Base class migration improves test stability.

The migration from SymfonyPage to SyliusPage ensures that methods like getAmountOfUnits() and getState() will now automatically wait for LiveComponents to finish loading before interacting with elements, addressing the flaky test issues described in the PR objectives.

src/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.php (1)

19-19: LGTM! Base class migration is correct.

The migration from SymfonyPage to SyliusPage is consistent and aligns with the PR objectives. The new base class adds LiveComponent synchronization in getElement(), which will benefit all element interactions in this class (particularly in checkValidationMessageFor() and password field methods).

Also applies to: 23-23

src/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.php (1)

16-18: LGTM! Base class migration adds LiveComponent synchronization.

The migration from SymfonyPage to SyliusPage is clean and aligns with the PR's objectives. The new base class automatically adds DriverHelper::waitForPageToLoad() synchronization before element access, ensuring LiveComponents finish loading before interactions. Since this class only implements getRouteName(), the risk is minimal and the change preserves existing behavior while gaining LiveComponent support.

src/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.php (1)

16-18: LGTM! Clean refactoring aligned with PR objectives.

The base class migration from SymfonyPage to SyliusPage is correct and consistent. This class now automatically inherits the LiveComponent synchronization logic (via SyliusPage::getElement() calling DriverHelper::waitForPageToLoad()), which helps prevent the flaky tests described in the PR objectives.

src/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.php (2)

23-23: LGTM! Import updated correctly.

The import statement has been properly updated to use SyliusPageInterface as part of the base class renaming refactor.


807-810: LGTM! Method signature correctly updated.

The return type has been properly updated to SyliusPageInterface, which aligns with the ValidationTrait expectation and the broader base class renaming refactor. The method implementation remains unchanged and correct.

Based on learnings

src/Sylius/Behat/Page/Shop/Account/LoginPageInterface.php (1)

16-18: LGTM! Clean migration to internal base interface.

The interface correctly migrates from SymfonyPageInterface to SyliusPageInterface, aligning with the PR's systematic refactoring to use Sylius-internal base classes.

src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.php (1)

16-18: LGTM! Consistent with the base interface migration.

The interface properly extends SyliusPageInterface, maintaining consistency with the broader refactoring pattern across the codebase.

src/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.php (1)

18-21: LGTM! Migration enables automatic LiveComponent synchronization.

The class correctly migrates to extend SyliusPage. This change ensures that all getElement() calls throughout this page (lines 30, 38, 45, 52, 60, 68, 83) now automatically wait for LiveComponents to finish loading, addressing the flaky test issues described in the PR objectives.

src/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.php (1)

16-19: LGTM! Consistent interface migration.

The interface correctly extends SyliusPageInterface, maintaining the systematic refactoring pattern.

src/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.php (1)

19-23: LGTM! Clean migration with synchronization benefits.

The class correctly extends SyliusPage, ensuring that element interactions (lines 48, 53, 58) now include automatic LiveComponent loading detection, improving test stability.

src/Sylius/Behat/Page/Admin/Account/LoginPageInterface.php (1)

16-18: LGTM! Consistent migration across Admin and Shop domains.

The interface correctly migrates to extend SyliusPageInterface, maintaining consistency with the Shop counterpart and the broader refactoring effort.

src/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.php (2)

22-22: LGTM! Import correctly updated to SyliusPageInterface.

This change aligns with the systematic refactor to use Sylius-specific base classes instead of FriendsOfBehat framework classes.


471-474: LGTM! Return type correctly updated to match ValidationTrait signature.

The return type change from SymfonyPageInterface to SyliusPageInterface is correct and consistent with the abstract method signature in ValidationTrait and the pattern used in other context files like ManagingChannelsContext and ManagingCatalogPromotionsContext.

src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1)

16-18: LGTM! Base class migration correctly implements LiveComponent synchronization.

The change from SymfonyPage to SyliusPage aligns with the PR objectives. The new base class adds waiting for LiveComponent loading states before element interactions, which will prevent flaky tests caused by interactions with elements while LiveComponents are still loading.

src/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.php (1)

16-18: Interface refactor is correct and maintains full compatibility.

The SyliusPageInterface extends BaseSymfonyPageInterface (SymfonyPageInterface from FriendsOfBehat), ensuring the contract is fully compatible with the previous parent interface. All implementations of IndexPageInterface are consistently updated to use SyliusPage, and no stray references to the old interface remain in the codebase. The change aligns with the PR objectives and is safe to merge.

src/Sylius/Behat/Page/Shop/Order/ShowPage.php (1)

17-17: LGTM! Base class migration aligns with PR objectives.

The change from SymfonyPage to SyliusPage correctly implements the renaming strategy and inherits the centralized LiveComponent synchronization logic that fixes the flaky test issues.

Also applies to: 20-20

src/Sylius/Behat/Page/Admin/Order/ShowPage.php (1)

19-19: LGTM! Base class migration is correct.

The migration to SyliusPage is consistent with the PR's refactoring strategy and brings the centralized LiveComponent wait logic to this page class.

Also applies to: 25-25

src/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.php (2)

22-22: LGTM! Import updated correctly.

The import statement has been properly updated to use SyliusPageInterface as part of the interface rename from SymfonyPageInterface to SyliusPageInterface. The placement follows the existing import organization.


407-410: Return type correctly updated and verified to be compatible with SyliusPageInterface.

The TaxRate CreatePageInterface extends BaseCreatePageInterface (aliased from Sylius\Behat\Page\Admin\Crud\CreatePageInterface) and the UpdatePageInterface extends BaseUpdatePageInterface (aliased from Sylius\Behat\Page\Admin\Crud\UpdatePageInterface). Both Crud base interfaces extend SyliusPageInterface, confirming that the page instances passed to getCurrentPageWithForm() are compatible with the method's return type.

src/Sylius/Behat/Page/Admin/Crud/IndexPage.php (1)

19-19: LGTM: Clean migration to SyliusPage base class.

The import and inheritance changes correctly migrate from the external FriendsOfBehat SymfonyPage to the internal SyliusPage base class. The new base class adds LiveComponent synchronization (via waitForPageToLoad) before element interactions, which addresses the flaky test issues described in the PR objectives.

Also applies to: 24-24

src/Sylius/Behat/Page/Shop/Account/Order/IndexPage.php (1)

17-17: LGTM: Consistent migration pattern.

The changes follow the same migration pattern, updating from SymfonyPage to SyliusPage. This ensures LiveComponent synchronization is applied before all element interactions in this page object.

Also applies to: 22-22

src/Sylius/Behat/Element/Product/ShowPage/ShippingElement.php (1)

16-16: LGTM: Element migration to SyliusElement.

The migration from FriendsOfBehat's Element to the internal SyliusElement base class is correct. The new base class adds waitForLiveComponentToFinish() which checks for [data-live-is-loading] and [busy] attributes, properly synchronizing with Symfony UX LiveComponent v2.30.0.

Also applies to: 18-18

src/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.php (1)

17-17: LGTM: Standard migration pattern applied.

The base class migration is correctly applied with no changes to the public API or method implementations.

Also applies to: 19-19

src/Sylius/Behat/Page/Admin/Order/HistoryPage.php (1)

16-16: LGTM: Consistent with refactoring pattern.

The migration to SyliusPage is correctly implemented, maintaining all existing functionality while gaining LiveComponent synchronization.

Also applies to: 18-18

src/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.php (1)

16-16: LGTM: Interface migration aligns with implementation.

The interface correctly migrates from SymfonyPageInterface to SyliusPageInterface, maintaining alignment with the concrete HistoryPage implementation.

Also applies to: 18-18

src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)

16-16: LGTM: Element migration completed correctly.

The migration to SyliusElement is correctly applied, ensuring this element benefits from LiveComponent synchronization when interacting with DOM elements.

Also applies to: 18-18

src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php (1)

21-21: LGTM: Type hint migration maintains consistency.

The import and PHPDoc changes correctly update the type hint from SymfonyPageInterface to SyliusPageInterface, maintaining consistency with the page object migrations throughout the codebase.

Also applies to: 379-379

src/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.php (1)

24-24: LGTM! Clean interface migration.

The migration from SymfonyPageInterface to SyliusPageInterface is consistent with the broader refactor and aligns with the ValidationTrait requirement. No logic changes, and the type system remains sound.

Also applies to: 962-965

src/Sylius/Behat/Page/Shop/Account/VerificationPage.php (1)

16-18: LGTM! Base class migration enables LiveComponent synchronization.

The migration to SyliusPage adds automatic wait logic for LiveComponent loading states without changing the public API. This directly addresses the PR's objective of fixing flaky tests.

src/Sylius/Behat/Element/Admin/TopBarElement.php (1)

16-18: LGTM! Element migration adds LiveComponent synchronization.

The migration to SyliusElement ensures that all element interactions wait for LiveComponents to finish loading using the correct attributes ([data-live-is-loading] and [busy]), addressing the flaky test issue.

src/Sylius/Behat/Element/Shop/MenuElement.php (1)

17-19: LGTM! Consistent element base class migration.

This migration follows the same pattern as other element classes, ensuring LiveComponent synchronization is applied consistently across the Behat test infrastructure.

src/Sylius/Behat/Element/Product/ShowPage/VariantsElement.php (1)

17-19: LGTM! Migration benefits element retrieval logic.

The migration to SyliusElement ensures that the multiple getElement() calls throughout this class (e.g., lines 97-100) properly wait for LiveComponents, reducing flakiness in variant-related tests.

src/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.php (1)

16-18: LGTM! Interface migration maintains type consistency.

The interface migration to SyliusPageInterface maintains type consistency with the corresponding implementation class and aligns with the broader refactor.

src/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.php (1)

16-18: LGTM! Consistent ShowPage element migration.

This migration ensures that taxonomy-related element interactions wait for LiveComponents, consistent with other ShowPage element classes in this PR.

src/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.php (1)

17-19: LGTM! Final element migration completes the pattern.

This migration maintains consistency with the other element and page classes in the PR, ensuring comprehensive LiveComponent synchronization across the Behat test infrastructure.

src/Sylius/Behat/Element/Admin/NotificationsElement.php (1)

17-20: Migration to SyliusElement looks good; confirm global wait semantics.

Extending SyliusElement ensures LiveComponents settle before resolving 'flashes_container'. Please verify the centralized wait timeout/selectors match PR intent (5s vs 10s, [data-live-is-loading] and [busy]) to avoid over/under-waiting.

src/Sylius/Behat/Element/Admin/Crud/FormElement.php (1)

18-21: LGTM on the SyliusElement migration.

Form interactions will benefit from the centralized LiveComponent settling in getElement().

src/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.php (1)

17-20: Base-class switch approved.

Centralized wait before resolving 'associations' improves stability with LiveComponents.

src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php (1)

16-19: LGTM.

Extending SyliusElement centralizes LiveComponent synchronization for the period input.

src/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.php (1)

17-21: Good migration to SyliusElement.

Element resolution now waits for LiveComponents; radio mapping remains safe with assertions.

src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php (1)

26-26: Interface swap is complete and correct.

Both line 26 (import) and line 725 (return type) now properly use SyliusPageInterface. Verification confirms no legacy SymfonyPageInterface usages remain in the Admin context folder, and the return type aligns with ValidationTrait expectations.

src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)

16-18: LGTM! Base class migration to SyliusElement.

The change correctly switches to the new SyliusElement base class, which provides automatic LiveComponent synchronization. This aligns with the PR's goal of fixing flaky tests by ensuring elements wait for LiveComponents to complete before interaction.

src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php (2)

25-25: LGTM! Interface rename aligned with PR refactor.

The import correctly switches from SymfonyPageInterface to SyliusPageInterface, consistent with the PR's renaming strategy.


1200-1203: LGTM! Return type updated consistently.

The return type correctly changes to SyliusPageInterface, matching the abstract method signature in ValidationTrait and maintaining consistency across the codebase.

src/Sylius/Behat/Element/SyliusElement.php (2)

23-28: Good implementation of centralized LiveComponent synchronization.

The override of getElement() ensures all element access waits for LiveComponents to finish, addressing the flaky test issues. The fast path (immediate return if condition is met) prevents performance degradation.


30-45: Timeout difference is intentional and justified.

The verification confirms the 10-second timeout is appropriate. The waitForLiveComponentToFinish() method performs more comprehensive checks than DriverHelper::waitForPageToLoad():

  • DriverHelper (1000ms): Checks readyState + !querySelector('[data-live-is-loading]')
  • SyliusElement (10000ms): Checks readyState + querySelectorAll('[data-live-is-loading]').length === 0 + querySelectorAll('[busy]').length === 0

The longer timeout is justified by the three distinct conditions and use of querySelectorAll (all elements) versus querySelector (first element). The code already includes explanatory comments documenting this intentional difference.

src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)

16-18: LGTM! Base class migration to SyliusElement.

The change correctly switches to SyliusElement, providing automatic LiveComponent synchronization for this element. This is consistent with the PR-wide refactor and helps eliminate flaky tests.

@NoResponseMate NoResponseMate merged commit 94efaa1 into Sylius:2.1 Oct 21, 2025
27 checks passed
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.

2 participants