[Behat] Fix flaky tests by correcting LiveComponent loading state detection#18448
Conversation
WalkthroughThis PR systematically refactors Behat test infrastructure to use internal Sylius-specific base classes. Multiple element and page classes are updated to extend Changes
Sequence DiagramsequenceDiagram
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
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 Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
b08e1a5 to
41b7c66
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (8)
src/Sylius/Behat/Element/SymfonyElementInterface.php (1)
7-8: Remove unused imports.Both
NodeElementandBaseElementare 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
BrowserElementandSymfonyElementreside 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 BrowserElementInterfacesrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.php (1)
35-37: Consider removing redundant wait call.The
DriverHelper::waitForPageToLoad()at line 35 may be redundant sincegetElement('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
finalmodifier.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
finalmodifier.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 === 0vs.!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 callDriverHelper::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
📒 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.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Admin/TopBarElement.phpsrc/Sylius/Behat/Element/Shop/Account/RegisterElement.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Service/JQueryHelper.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Element/SymfonyElementInterface.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Service/DriverHelper.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Element/SymfonyElement.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/MediaElement.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/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.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Admin/TopBarElement.phpsrc/Sylius/Behat/Element/Shop/Account/RegisterElement.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Service/JQueryHelper.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Element/SymfonyElementInterface.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Service/DriverHelper.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Element/SymfonyElement.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/MediaElement.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/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 overriddengetElement()method. All existing calls togetElement()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
SymfonyElementis 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 inJQueryHelperand the wait logic inSymfonyElement, 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 (onlygetElement()does), whilegetElement()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
ElementtoSymfonyElementis correct and follows the PR's refactoring pattern. The class now automatically benefits from LiveComponent wait logic whenevergetElement()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 withhasElement()beforegetElement(), 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
ElementtoSymfonyElementis correct and consistent with the PR's objectives. This element now benefits from automatic LiveComponent wait logic on allgetElement()calls.src/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.php (1)
16-18: LGTM – consistent migration pattern.The class correctly extends
SymfonyElementand 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 sincegetDocument()andgetDriver()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
SymfonyElementis consistent with the PR pattern. Note that this class has a localwaitForFormUpdate()method (lines 69-75) that also waits for the[busy]attribute, which now overlaps with the global wait inSymfonyElement.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
SymfonyElementwhile maintaining its constructor signature and interface implementation. Similar toFormElement, this class has a localwaitForFormUpdate()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
SymfonyElementis 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 |
There was a problem hiding this comment.
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.
b445cc4 to
0fba90c
Compare
There was a problem hiding this comment.
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 callsDriverHelper::waitForPageToLoad(), the explicit wait on line 30 is redundant—the subsequentgetElement()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
📒 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.phpsrc/Sylius/Behat/Element/SyliusElementInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.phpsrc/Sylius/Behat/Page/Admin/Customer/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePage.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterPage.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPage.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.phpsrc/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.phpsrc/Sylius/Behat/Element/BrowserElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/MediaElement.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPage.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Element/Shop/Account/RegisterElement.phpsrc/Sylius/Behat/Page/Admin/DashboardPage.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePage.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Page/Admin/DashboardPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Page/Shop/HomePage.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Page/Shop/HomePageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.phpsrc/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.phpsrc/Sylius/Behat/Element/SyliusElementInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.phpsrc/Sylius/Behat/Page/Admin/Customer/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePage.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterPage.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePage.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPage.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.phpsrc/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPage.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterPageInterface.phpsrc/Sylius/Behat/Element/BrowserElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/MediaElement.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPage.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Element/Shop/Account/RegisterElement.phpsrc/Sylius/Behat/Page/Admin/DashboardPage.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePage.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Admin/CatalogPromotion/FilterElement.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Admin/CatalogPromotion/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Page/Admin/DashboardPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Page/Shop/HomePage.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Page/Shop/HomePageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.phpsrc/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
0fba90c to
2c5c352
Compare
There was a problem hiding this comment.
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 callswaitForLiveComponentToFinish(), 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. Thesleep(1)and subsequentwaitFor()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 whengetElement()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 asfinalper coding guidelines.The coding guidelines specify that all classes should be marked
final, except entities and repositories. SinceVerificationPageis a Behat page object, it should be marked asfinalto prevent unintended inheritance and improve code maintainability.Apply this diff:
-class VerificationPage extends SyliusPage implements VerificationPageInterface +final class VerificationPage extends SyliusPage implements VerificationPageInterfacesrc/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
finalexcept 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 ProfileUpdatePageInterfaceAs per coding guidelines
src/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.php (1)
29-31: Consider removing the redundant wait.Since
SyliusPage::getElement()now automatically callsDriverHelper::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 finalPer 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 arraySmall 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 finalPer 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
📒 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.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Admin/Customer/ShowPage.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Shipment/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/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.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Admin/Customer/ShowPage.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Element/Shop/CheckoutSubtotalElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/ProfileUpdatePage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Payment/PaymentRequest/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/ShowToEditPageSwitcherInterface.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Page/Admin/ShowPageButtonCheckerInterface.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Element/Shop/MenuElement.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/CompletePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePage.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Shipment/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPageInterface.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/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
2c5c352 to
310daa9
Compare
There was a problem hiding this comment.
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 thehasElement()guard or add explicit waiting before it, as it creates a race condition with LiveComponent loading.The
hasElement()call (line 22) does not triggerwaitForLiveComponentToFinish()becausehasElement()is inherited from Behat'sBaseElementand is not overridden inSyliusElement. OnlygetElement()triggers the wait logic. Ifcart_quantityis a LiveComponent,hasElement()may returnfalsewhile the component is still loading, causing an early return of0instead of waiting for the element to appear—exactly the race condition this PR aims to fix.Options:
- Remove the
hasElement()guard and catch the exception if the element is truly missing, or- Call
getElement()directly and let the built-in waiting handle both the wait and the fetch, or- Add an explicit
waitForLiveComponentToFinish()call before thehasElement()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
SymfonyPagetoSyliusPagealigns with the PR's renaming effort. The class correctly implementsWellKnownPasswordChangePageInterfacewhich now also extendsSyliusPageInterface.Note: The timeout/selector inconsistency between
DriverHelper::waitForPageToLoad()(1000ms, checks only[data-live-is-loading]) andSyliusElement::waitForLiveComponentToFinish()(10000ms, checks both selectors) flagged in the previous review remains applicable to this class since it inheritsSyliusPage::getElement()which usesDriverHelper.
🧹 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 RequestPasswordResetPageInterfaceAs 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
SymfonyPagetoSyliusPageis correct and directly addresses the PR objective. The new base class addsDriverHelper::waitForPageToLoad()before everygetElement()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
finalto 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 HomePageInterfacesrc/Sylius/Behat/Element/SaveElement.php (1)
19-19: Base class change looks good; consider making the class final.The migration from
ElementtoSyliusElementcorrectly aligns with the PR objectives to fix flaky tests through proper LiveComponent loading detection. The automatic wait logic inSyliusElement::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 thefinalkeyword.Apply this diff to make the class final:
-class SaveElement extends SyliusElement implements SaveElementInterface +final class SaveElement extends SyliusElement implements SaveElementInterfacesrc/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 callsDriverHelper::waitForPageToLoad()after the button click, while the admin version does not. Since the admin implementation usesgetDocument()->pressButton()rather thangetElement(), 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 TaxonomyElementInterfacesrc/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 SearchFilterElementInterfacesrc/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
📒 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.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPage.phpsrc/Sylius/Behat/Element/SyliusElementInterface.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Admin/DashboardPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Page/Shop/HomePage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/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.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPaymentMethodsContext.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectPaymentPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Page/Shop/Account/Order/ShowPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPage.phpsrc/Sylius/Behat/Element/SyliusElementInterface.phpsrc/Sylius/Behat/Element/Shop/CartWidgetElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingShippingCategoriesContext.phpsrc/Sylius/Behat/Element/Admin/ProductAttribute/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AttributesElement.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePage.phpsrc/Sylius/Behat/Page/Admin/EditToShowPageSwitcherInterface.phpsrc/Sylius/Behat/Element/SaveElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Page/Admin/Crud/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Admin/DashboardPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPageInterface.phpsrc/Sylius/Behat/Page/Shop/Checkout/SelectShippingPageInterface.phpsrc/Sylius/Behat/Page/Shop/HomePage.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Product/ShowPageInterface.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Element/Admin/Crud/Index/SearchFilterElement.phpsrc/Sylius/Behat/Element/Admin/TaxRate/FilterElement.phpsrc/Sylius/Behat/Element/Admin/Taxon/TreeElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/DetailsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/PricingElement.phpsrc/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
310daa9 to
64d45ed
Compare
64d45ed to
1feb809
Compare
There was a problem hiding this comment.
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
SyliusPagebase class. This automatically inherits the LiveComponent synchronization logic (DriverHelper::waitForPageToLoad()ingetElement()), which addresses the flaky test issues described in the PR objectives.Optional: Consider adding
finalkeyword.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 ImpersonateUserPageInterfaceAs per coding guidelines.
src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1)
18-65: Consider marking the class asfinalif not extended.Per the Sylius Coding Standard, classes should be marked
finalexcept for entities and repositories. IfDashboardPageis 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 DashboardPageInterfaceAs per coding guidelines.
src/Sylius/Behat/Page/Shop/Order/ShowPage.php (1)
52-58: Consider removing redundant wait call.Since
SyliusPage::getElement()now automatically callsDriverHelper::waitForPageToLoad()before retrieving elements, the explicit wait on line 54 is redundant—line 56'sgetElement()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 invokeDriverHelper::waitForPageToLoad()via theSyliusPageoverride.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 LowestPriceFlagElementInterfacesrc/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
📒 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.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPageInterface.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Order/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Admin/TopBarElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Page/Admin/Shipment/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPage.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/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.phpsrc/Sylius/Behat/Element/Admin/Channel/ShippingAddressInCheckoutRequiredElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/IndexPageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/RequestPasswordResetPage.phpsrc/Sylius/Behat/Page/Shop/Account/DashboardPage.phpsrc/Sylius/Behat/Element/Admin/Crud/FormElement.phpsrc/Sylius/Behat/Page/Shop/Account/ResetPasswordPage.phpsrc/Sylius/Behat/Element/Admin/Account/ResetElement.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/CreatePageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/LoginPageInterface.phpsrc/Sylius/Behat/Context/Ui/Shop/AddressBookContext.phpsrc/Sylius/Behat/Page/Admin/Administrator/ImpersonateUserPage.phpsrc/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPage.phpsrc/Sylius/Behat/Context/Ui/Admin/Helper/ValidationTrait.phpsrc/Sylius/Behat/Page/Shop/Account/RegisterThankYouPage.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPageInterface.phpsrc/Sylius/Behat/Page/Shop/Account/VerificationPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Order/ShowPage.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.phpsrc/Sylius/Behat/Page/Shop/Account/WellKnownPasswordChangePage.phpsrc/Sylius/Behat/Element/Product/ShowPage/OptionsElement.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingPromotionsContext.phpsrc/Sylius/Behat/Page/Shop/Account/Order/IndexPage.phpsrc/Sylius/Behat/Element/Admin/TopBarElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TaxonomyElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/AssociationsElement.phpsrc/Sylius/Behat/Page/Shop/Account/ChangePasswordPage.phpsrc/Sylius/Behat/Page/Admin/Crud/IndexPage.phpsrc/Sylius/Behat/Element/SyliusElement.phpsrc/Sylius/Behat/Page/Admin/Shipment/ShowPage.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePageInterface.phpsrc/Sylius/Behat/Page/Admin/Account/LoginPageInterface.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingTaxRateContext.phpsrc/Sylius/Behat/Context/Ui/Admin/ManagingProductVariantsContext.phpsrc/Sylius/Behat/Page/Shop/Account/AddressBook/UpdatePage.phpsrc/Sylius/Behat/Element/Admin/NotificationsElement.phpsrc/Sylius/Behat/Page/Admin/Order/ShowPage.phpsrc/Sylius/Behat/Page/Admin/Order/HistoryPage.phpsrc/Sylius/Behat/Element/Admin/Channel/LowestPriceFlagElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/ShippingElement.phpsrc/Sylius/Behat/Element/Product/IndexPage/VerticalMenuElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/TranslationsElement.phpsrc/Sylius/Behat/Element/Product/ShowPage/VariantsElement.phpsrc/Sylius/Behat/Page/Admin/Crud/CreatePageInterface.phpsrc/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.phpsrc/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
SymfonyPageInterfacetoSyliusPageInterfaceis 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
SymfonyPageInterfacetoSyliusPageInterface, 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
SymfonyPagetoSyliusPageensures that methods likegetAmountOfUnits()andgetState()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
SymfonyPagetoSyliusPageis consistent and aligns with the PR objectives. The new base class adds LiveComponent synchronization ingetElement(), which will benefit all element interactions in this class (particularly incheckValidationMessageFor()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
SymfonyPagetoSyliusPageis clean and aligns with the PR's objectives. The new base class automatically addsDriverHelper::waitForPageToLoad()synchronization before element access, ensuring LiveComponents finish loading before interactions. Since this class only implementsgetRouteName(), 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
SymfonyPagetoSyliusPageis correct and consistent. This class now automatically inherits the LiveComponent synchronization logic (viaSyliusPage::getElement()callingDriverHelper::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
SyliusPageInterfaceas 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 theValidationTraitexpectation 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
SymfonyPageInterfacetoSyliusPageInterface, 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 allgetElement()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
SymfonyPageInterfacetoSyliusPageInterfaceis correct and consistent with the abstract method signature inValidationTraitand the pattern used in other context files likeManagingChannelsContextandManagingCatalogPromotionsContext.src/Sylius/Behat/Page/Shop/Account/DashboardPage.php (1)
16-18: LGTM! Base class migration correctly implements LiveComponent synchronization.The change from
SymfonyPagetoSyliusPagealigns 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
SyliusPageInterfaceextendsBaseSymfonyPageInterface(SymfonyPageInterface from FriendsOfBehat), ensuring the contract is fully compatible with the previous parent interface. All implementations ofIndexPageInterfaceare consistently updated to useSyliusPage, 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
SymfonyPagetoSyliusPagecorrectly 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
SyliusPageis 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
SyliusPageInterfaceas part of the interface rename fromSymfonyPageInterfacetoSyliusPageInterface. The placement follows the existing import organization.
407-410: Return type correctly updated and verified to be compatible with SyliusPageInterface.The TaxRate
CreatePageInterfaceextendsBaseCreatePageInterface(aliased fromSylius\Behat\Page\Admin\Crud\CreatePageInterface) and theUpdatePageInterfaceextendsBaseUpdatePageInterface(aliased fromSylius\Behat\Page\Admin\Crud\UpdatePageInterface). Both Crud base interfaces extendSyliusPageInterface, confirming that the page instances passed togetCurrentPageWithForm()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
SymfonyPageto the internalSyliusPagebase class. The new base class adds LiveComponent synchronization (viawaitForPageToLoad) 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
SymfonyPagetoSyliusPage. 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
Elementto the internalSyliusElementbase class is correct. The new base class addswaitForLiveComponentToFinish()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
SyliusPageis 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
SymfonyPageInterfacetoSyliusPageInterface, maintaining alignment with the concreteHistoryPageimplementation.Also applies to: 18-18
src/Sylius/Behat/Element/Product/ShowPage/LowestPriceInformationElement.php (1)
16-16: LGTM: Element migration completed correctly.The migration to
SyliusElementis 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
SymfonyPageInterfacetoSyliusPageInterface, 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
SymfonyPageInterfacetoSyliusPageInterfaceis consistent with the broader refactor and aligns with theValidationTraitrequirement. 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
SyliusPageadds 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
SyliusElementensures 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
SyliusElementensures that the multiplegetElement()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
SyliusPageInterfacemaintains 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 legacySymfonyPageInterfaceusages remain in the Admin context folder, and the return type aligns withValidationTraitexpectations.src/Sylius/Behat/Element/Product/ShowPage/OptionsElement.php (1)
16-18: LGTM! Base class migration to SyliusElement.The change correctly switches to the new
SyliusElementbase 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
SymfonyPageInterfacetoSyliusPageInterface, 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 inValidationTraitand 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 thanDriverHelper::waitForPageToLoad():
- DriverHelper (1000ms): Checks
readyState + !querySelector('[data-live-is-loading]')- SyliusElement (10000ms): Checks
readyState + querySelectorAll('[data-live-is-loading]').length === 0 + querySelectorAll('[busy]').length === 0The longer timeout is justified by the three distinct conditions and use of
querySelectorAll(all elements) versusquerySelector(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.
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
Before March 25, 2025: Sylius used jQuery AJAX detection
March 25, 2025 (PR: Changed it to:
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:
The correct attributes are:
[busy]- set on target element during loading[data-live-is-loading]- set on elements withdata-loadingdirectivesSolution
This PR fixes the issue by:
Fixing loading state detection across all Behat helpers:
DriverHelper::waitForPageToLoad()- fixed to use[data-live-is-loading]JQueryHelpermethods - fixed to use[data-live-is-loading]Adding centralized wait logic in
SyliusElement::getElement():document.readyState,[data-live-is-loading], and[busy]attributesRenaming base classes for clarity:
SymfonyElement→SyliusElement(contains Sylius-specific LiveComponent logic)SymfonyPage→SyliusPage(contains Sylius-specific page behavior)Impact
References
Summary by CodeRabbit