diff --git a/src/Sylius/Behat/Element/Admin/CatalogPromotion/FormElement.php b/src/Sylius/Behat/Element/Admin/CatalogPromotion/FormElement.php index 5edff044d04d..ffd9f10e1c77 100644 --- a/src/Sylius/Behat/Element/Admin/CatalogPromotion/FormElement.php +++ b/src/Sylius/Behat/Element/Admin/CatalogPromotion/FormElement.php @@ -204,20 +204,20 @@ protected function getDefinedElements(): array return array_merge(parent::getDefinedElements(), [ 'add_action_button' => '[data-test-actions] [data-test-add-%type%]', 'add_scope_button' => '[data-test-scopes] [data-test-add-%type%]', - 'channels' => '#sylius_catalog_promotion_channels', - 'description' => '[name="sylius_catalog_promotion[translations][%locale_code%][description]"]', - 'enabled' => '#sylius_catalog_promotion_enabled', - 'end_date_date' => '#sylius_catalog_promotion_endDate_date', - 'end_date_time' => '#sylius_catalog_promotion_endDate_time', - 'exclusive' => '#sylius_catalog_promotion_exclusive', + 'channels' => '#sylius_admin_catalog_promotion_channels', + 'description' => '[name="sylius_admin_catalog_promotion[translations][%locale_code%][description]"]', + 'enabled' => '#sylius_admin_catalog_promotion_enabled', + 'end_date_date' => '#sylius_admin_catalog_promotion_endDate_date', + 'end_date_time' => '#sylius_admin_catalog_promotion_endDate_time', + 'exclusive' => '#sylius_admin_catalog_promotion_exclusive', 'form' => '[data-live-name-value="sylius_admin:catalog_promotion:form"]', - 'label' => '[name="sylius_catalog_promotion[translations][%locale_code%][label]"]', + 'label' => '[name="sylius_admin_catalog_promotion[translations][%locale_code%][label]"]', 'last_action' => '[data-test-actions] [data-test-entry-row]:last-child', 'last_scope' => '[data-test-scopes] [data-test-entry-row]:last-child', - 'name' => '#sylius_catalog_promotion_name', - 'priority' => '#sylius_catalog_promotion_priority', - 'start_date_date' => '#sylius_catalog_promotion_startDate_date', - 'start_date_time' => '#sylius_catalog_promotion_startDate_time', + 'name' => '#sylius_admin_catalog_promotion_name', + 'priority' => '#sylius_admin_catalog_promotion_priority', + 'start_date_date' => '#sylius_admin_catalog_promotion_startDate_date', + 'start_date_time' => '#sylius_admin_catalog_promotion_startDate_time', ]); } diff --git a/src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php b/src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php index 3e1c960bbe03..3ad6f3961474 100644 --- a/src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php +++ b/src/Sylius/Behat/Element/Admin/Channel/DiscountedProductsCheckingPeriodInputElement.php @@ -30,7 +30,7 @@ public function getPeriod(): int protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'discounted_products_checking_period' => '#sylius_channel_channelPriceHistoryConfig_lowestPriceForDiscountedProductsCheckingPeriod', + 'discounted_products_checking_period' => '#sylius_admin_channel_channelPriceHistoryConfig_lowestPriceForDiscountedProductsCheckingPeriod', ]); } } diff --git a/src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php b/src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php index 01a304af68cf..82e44e414bea 100644 --- a/src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php +++ b/src/Sylius/Behat/Element/Admin/Channel/ShopBillingDataElement.php @@ -58,12 +58,12 @@ public function hasBillingAddress(string $street, string $postcode, string $city protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'city' => '#sylius_channel_shopBillingData_city', - 'company' => '#sylius_channel_shopBillingData_company', - 'country_code' => '#sylius_channel_shopBillingData_countryCode', - 'postcode' => '#sylius_channel_shopBillingData_postcode', - 'street' => '#sylius_channel_shopBillingData_street', - 'tax_id' => '#sylius_channel_shopBillingData_taxId', + 'city' => '#sylius_admin_channel_shopBillingData_city', + 'company' => '#sylius_admin_channel_shopBillingData_company', + 'country_code' => '#sylius_admin_channel_shopBillingData_countryCode', + 'postcode' => '#sylius_admin_channel_shopBillingData_postcode', + 'street' => '#sylius_admin_channel_shopBillingData_street', + 'tax_id' => '#sylius_admin_channel_shopBillingData_taxId', ]); } } diff --git a/src/Sylius/Behat/Element/Admin/ShippingMethod/FormElement.php b/src/Sylius/Behat/Element/Admin/ShippingMethod/FormElement.php index c9fb8eee66dc..0f4549770ac9 100644 --- a/src/Sylius/Behat/Element/Admin/ShippingMethod/FormElement.php +++ b/src/Sylius/Behat/Element/Admin/ShippingMethod/FormElement.php @@ -150,21 +150,21 @@ protected function getDefinedElements(): array { return [ 'add_rule_button' => '[data-test-rules] [data-test-add-%type%]', - 'calculator' => '#sylius_shipping_method_calculator', - 'calculator_configuration_amount' => '#sylius_shipping_method_configuration_%channelCode%_amount', + 'calculator' => '#sylius_admin_shipping_method_calculator', + 'calculator_configuration_amount' => '#sylius_admin_shipping_method_configuration_%channelCode%_amount', 'calculator_configuration_channel_tab' => '[data-test-calculator-configuration] [data-test-channel-tab="%channelCode%"]', 'calculator_configuration_channel_tab_content' => '[data-test-calculator-configuration] [data-test-channel-tab-content="%channelCode%"]', - 'channel' => '[name="sylius_shipping_method[channels][]"][value="%channelCode%"]', - 'code' => '#sylius_shipping_method_code', - 'description' => '#sylius_shipping_method_translations_%localeCode%_description', - 'enabled' => '#sylius_shipping_method_enabled', + 'channel' => '[name="sylius_admin_shipping_method[channels][]"][value="%channelCode%"]', + 'code' => '#sylius_admin_shipping_method_code', + 'description' => '#sylius_admin_shipping_method_translations_%localeCode%_description', + 'enabled' => '#sylius_admin_shipping_method_enabled', 'form' => '[data-live-name-value="sylius_admin:shipping_method:form"]', 'last_rule' => '[data-test-rules] [data-test-entry-row]:last-child', 'last_rule_amount' => '[data-test-rules] [data-test-entry-row]:last-child [id$="_configuration_%channelCode%_amount"]', 'last_rule_weight' => '[data-test-rules] [data-test-entry-row]:last-child [id$="_configuration_weight"]', - 'name' => '#sylius_shipping_method_translations_%localeCode%_name', - 'position' => '#sylius_shipping_method_position', - 'zone' => '#sylius_shipping_method_zone', + 'name' => '#sylius_admin_shipping_method_translations_%localeCode%_name', + 'position' => '#sylius_admin_shipping_method_position', + 'zone' => '#sylius_admin_shipping_method_zone', ]; } diff --git a/src/Sylius/Behat/Page/Admin/CatalogPromotion/CreatePage.php b/src/Sylius/Behat/Page/Admin/CatalogPromotion/CreatePage.php index 8755f105c35d..8ecc988be471 100644 --- a/src/Sylius/Behat/Page/Admin/CatalogPromotion/CreatePage.php +++ b/src/Sylius/Behat/Page/Admin/CatalogPromotion/CreatePage.php @@ -23,8 +23,8 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'code' => '#sylius_catalog_promotion_code', - 'name' => '#sylius_catalog_promotion_name', + 'code' => '#sylius_admin_catalog_promotion_code', + 'name' => '#sylius_admin_catalog_promotion_name', ]); } } diff --git a/src/Sylius/Behat/Page/Admin/CatalogPromotion/UpdatePage.php b/src/Sylius/Behat/Page/Admin/CatalogPromotion/UpdatePage.php index e928a8d58077..686143d697e9 100644 --- a/src/Sylius/Behat/Page/Admin/CatalogPromotion/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/CatalogPromotion/UpdatePage.php @@ -29,7 +29,7 @@ protected function getCodeElement(): NodeElement protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'code' => '#sylius_catalog_promotion_code', + 'code' => '#sylius_admin_catalog_promotion_code', ]); } } diff --git a/src/Sylius/Behat/Page/Admin/Channel/FormTrait.php b/src/Sylius/Behat/Page/Admin/Channel/FormTrait.php index 138201da88fc..29117e85b0db 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/FormTrait.php +++ b/src/Sylius/Behat/Page/Admin/Channel/FormTrait.php @@ -23,9 +23,9 @@ public function getDefinedFormElements(): array 'color' => '[data-test-color]', 'contact_email' => '[data-test-contact-email]', 'contact_phone_number' => '[data-test-contact-phone-number]', - 'countries' => '#sylius_channel_countries', - 'currencies' => '#sylius_channel_currencies', - 'default_locale' => '#sylius_channel_defaultLocale', + 'countries' => '#sylius_admin_channel_countries', + 'currencies' => '#sylius_admin_channel_currencies', + 'default_locale' => '#sylius_admin_channel_defaultLocale', 'default_tax_zone' => '[data-test-default-tax-zone]', 'discounted_products_checking_period' => '[data-test-lowest-price-for-discounted-products-checking-period]', 'enabled' => '[data-test-enabled]', diff --git a/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php index 98e6471e92e0..e249cda24e35 100644 --- a/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/Order/UpdatePage.php @@ -96,23 +96,23 @@ private function getOptionTextsFor(NodeElement $element): array protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'billing_city' => '#sylius_order_billingAddress_city', - 'billing_country' => '#sylius_order_billingAddress_countryCode', - 'billing_first_name' => '#sylius_order_billingAddress_firstName', - 'billing_last_name' => '#sylius_order_billingAddress_lastName', - 'billing_postcode' => '#sylius_order_billingAddress_postcode', - 'billing_province_name' => '#sylius_order_billingAddress_provinceName', - 'billing_province_code' => '#sylius_order_billingAddress_provinceCode', - 'billing_street' => '#sylius_order_billingAddress_street', + 'billing_city' => '#sylius_admin_order_billingAddress_city', + 'billing_country' => '#sylius_admin_order_billingAddress_countryCode', + 'billing_first_name' => '#sylius_admin_order_billingAddress_firstName', + 'billing_last_name' => '#sylius_admin_order_billingAddress_lastName', + 'billing_postcode' => '#sylius_admin_order_billingAddress_postcode', + 'billing_province_name' => '#sylius_admin_order_billingAddress_provinceName', + 'billing_province_code' => '#sylius_admin_order_billingAddress_provinceCode', + 'billing_street' => '#sylius_admin_order_billingAddress_street', 'live_form' => '[data-live-name-value="sylius_admin:order:form"]', - 'shipping_city' => '#sylius_order_shippingAddress_city', - 'shipping_country' => '#sylius_order_shippingAddress_countryCode', - 'shipping_first_name' => '#sylius_order_shippingAddress_firstName', - 'shipping_last_name' => '#sylius_order_shippingAddress_lastName', - 'shipping_postcode' => '#sylius_order_shippingAddress_postcode', - 'shipping_province_name' => '#sylius_order_shippingAddress_provinceName', - 'shipping_province_code' => '#sylius_order_shippingAddress_provinceCode', - 'shipping_street' => '#sylius_order_shippingAddress_street', + 'shipping_city' => '#sylius_admin_order_shippingAddress_city', + 'shipping_country' => '#sylius_admin_order_shippingAddress_countryCode', + 'shipping_first_name' => '#sylius_admin_order_shippingAddress_firstName', + 'shipping_last_name' => '#sylius_admin_order_shippingAddress_lastName', + 'shipping_postcode' => '#sylius_admin_order_shippingAddress_postcode', + 'shipping_province_name' => '#sylius_admin_order_shippingAddress_provinceName', + 'shipping_province_code' => '#sylius_admin_order_shippingAddress_provinceCode', + 'shipping_street' => '#sylius_admin_order_shippingAddress_street', ]); } diff --git a/src/Sylius/Behat/Page/Admin/Product/FormTrait.php b/src/Sylius/Behat/Page/Admin/Product/FormTrait.php index 237dfa216a52..b44e0f6851d0 100644 --- a/src/Sylius/Behat/Page/Admin/Product/FormTrait.php +++ b/src/Sylius/Behat/Page/Admin/Product/FormTrait.php @@ -29,13 +29,13 @@ public function getDefinedFormElements(): array 'attribute_value' => '[data-test-attribute-value][data-test-locale-code="%localeCode%"][data-test-attribute-name="%attributeName%"]', 'channel_tab' => '[data-test-channel-tab="%channelCode%"]', 'form' => '[data-live-name-value="sylius_admin:product:form"]', - 'field_associations' => '[name="sylius_product[associations][%association%][]"]', - 'field_name' => '[name="sylius_product[translations][%localeCode%][name]"]', - 'field_slug' => '[name="sylius_product[translations][%localeCode%][slug]"]', - 'field_price' => '[name="sylius_product[variant][channelPricings][%channelCode%][price]"]', - 'field_original_price' => '[name="sylius_product[variant][channelPricings][%channelCode%][originalPrice]"]', - 'field_shipping_category' => '[name="sylius_product[variant][shippingCategory]"]', - 'field_shipping_required' => '[name="sylius_product[variant][shippingRequired]"]', + 'field_associations' => '[name="sylius_admin_product[associations][%association%][]"]', + 'field_name' => '[name="sylius_admin_product[translations][%localeCode%][name]"]', + 'field_slug' => '[name="sylius_admin_product[translations][%localeCode%][slug]"]', + 'field_price' => '[name="sylius_admin_product[variant][channelPricings][%channelCode%][price]"]', + 'field_original_price' => '[name="sylius_admin_product[variant][channelPricings][%channelCode%][originalPrice]"]', + 'field_shipping_category' => '[name="sylius_admin_product[variant][shippingCategory]"]', + 'field_shipping_required' => '[name="sylius_admin_product[variant][shippingRequired]"]', 'generate_product_slug_button' => '[data-test-generate-product-slug-button="%localeCode%"]', 'images' => '[data-test-images]', 'image_subform' => '[data-test-image-subform]', diff --git a/src/Sylius/Behat/Page/Admin/ProductVariant/GeneratePage.php b/src/Sylius/Behat/Page/Admin/ProductVariant/GeneratePage.php index 344d7575fbe1..a8cf5a9b3a1b 100644 --- a/src/Sylius/Behat/Page/Admin/ProductVariant/GeneratePage.php +++ b/src/Sylius/Behat/Page/Admin/ProductVariant/GeneratePage.php @@ -79,9 +79,9 @@ protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ 'generate_button' => '[data-test-generate-button]', - 'delete_button' => '#sylius_product_generate_variants_variants_%position% [data-test-delete-button]', - 'code' => '#sylius_product_generate_variants_variants_%position% [data-test-code]', - 'channel_pricings' => '#sylius_product_generate_variants_variants_%position% [data-test-channel-pricings]', + 'delete_button' => '#sylius_admin_product_generate_variants_variants_%position% [data-test-delete-button]', + 'code' => '#sylius_admin_product_generate_variants_variants_%position% [data-test-code]', + 'channel_pricings' => '#sylius_admin_product_generate_variants_variants_%position% [data-test-channel-pricings]', 'form' => '[data-live-name-value="sylius_admin:product:generate_product_variants_form"]', ]); } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/CatalogPromotionType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/CatalogPromotionType.php index 36caff95d24b..84f98d60343d 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/CatalogPromotionType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/CatalogPromotionType.php @@ -69,4 +69,9 @@ public function getParent(): string { return BaseCatalogPromotionType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_catalog_promotion'; + } } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/ChannelType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/ChannelType.php index e5c3f1da0046..af5c4ca88e83 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/ChannelType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/ChannelType.php @@ -37,4 +37,9 @@ public function getParent(): string { return BaseChannelType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_channel'; + } } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/OrderType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/OrderType.php index 122443433272..54a6b9c7554b 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/OrderType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/OrderType.php @@ -43,4 +43,9 @@ public function getParent(): string { return BaseOrderType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_order'; + } } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/ProductGenerateVariantsType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/ProductGenerateVariantsType.php index 427c0bbb6747..a82b293d90c0 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/ProductGenerateVariantsType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/ProductGenerateVariantsType.php @@ -40,4 +40,9 @@ public function getParent(): string { return BaseProductGenerateVariantsType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_product_generate_variants'; + } } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/ProductType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/ProductType.php index af5152a47016..320dcd1779fd 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/ProductType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/ProductType.php @@ -45,4 +45,9 @@ public function getParent(): string { return BaseProductType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_product'; + } } diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/ShippingMethodType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/ShippingMethodType.php index 44889afaa4b2..988bf10b8042 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/ShippingMethodType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/ShippingMethodType.php @@ -55,4 +55,9 @@ public function getParent(): string { return BaseShippingMethodType::class; } + + public function getBlockPrefix(): string + { + return 'sylius_admin_shipping_method'; + } }