From 82ad2074f6fc6c88c6ba2627cbdf97f01d84e0e7 Mon Sep 17 00:00:00 2001 From: Vitaliy Goncharenko <vgoncharenko@magento.com> Date: Thu, 10 Nov 2016 18:59:02 +0200 Subject: [PATCH] MAGETWO-60818: [FT] Incorrect array index 'frontend_type' in the CreateBundleProductEntityTest --- .../app/Magento/Bundle/Test/Block/Catalog/Product/View.php | 1 + .../Test/Block/Catalog/Product/View/Type/Option/Hidden.xml | 3 +-- .../Magento/Bundle/Test/Constraint/AssertBundleProductForm.php | 1 + .../Bundle/Test/Repository/BundleProduct/CheckoutData.xml | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php index ec96c5b27f5..3f023375784 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View.php @@ -95,6 +95,7 @@ class View extends \Magento\Catalog\Test\Block\Product\View ); $this->_rootElement->find($this->customizeButton)->click(); $this->waitForElementVisible($this->addToCart); + $this->waitForElementVisible($this->visibleOptions, Locator::SELECTOR_XPATH); } /** diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Hidden.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Hidden.xml index 356f6a52d6b..ecced21254c 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Hidden.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Catalog/Product/View/Type/Option/Hidden.xml @@ -8,8 +8,7 @@ <mapping strict="1"> <fields> <qty> - <selector>//input[contains(@class,"qty")]</selector> - <strategy>xpath</strategy> + <selector>input.qty</selector> <class>Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option\Element\Qty</class> </qty> </fields> diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php index d9b843cc37a..9a2304c876f 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php @@ -52,6 +52,7 @@ class AssertBundleProductForm extends AssertProductForm protected function prepareBundleOptions(array $bundleSelections) { foreach ($bundleSelections as &$item) { + unset($item['frontend_type']); foreach ($item['assigned_products'] as &$selection) { $selection['data']['getProductName'] = $selection['search_data']['name']; $selection = $selection['data']; diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml index d68fb0d0b83..19495c12d5d 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml @@ -353,6 +353,7 @@ <item name="3" xsi:type="array"> <item name="title" xsi:type="string">Multiple Select Option</item> <item name="type" xsi:type="string">Multiple</item> + <item name="frontend_type" xsi:type="string">Multiple</item> <item name="value" xsi:type="array"> <item name="name" xsi:type="string">product_100_dollar</item> </item> @@ -367,6 +368,7 @@ <item name="0" xsi:type="array"> <item name="title" xsi:type="string">Drop-down Option</item> <item name="type" xsi:type="string">Drop-down</item> + <item name="frontend_type" xsi:type="string">Drop-down</item> <item name="value" xsi:type="array"> <item name="name" xsi:type="string">Test simple product</item> </item> -- GitLab