diff --git a/dev/tests/functional/.gitignore b/dev/tests/functional/.gitignore index 7e46f3cf256a67062dae3044cd3462a6be369bba..78113e9adbdb237742639944c20a4231a53abbf3 100755 --- a/dev/tests/functional/.gitignore +++ b/dev/tests/functional/.gitignore @@ -1,12 +1,7 @@ **/var /composer.lock -/config/* /generated /lib/Magento/Mtf/Util/Generate/testcase.xml /vendor -!/config/application.yml.dist -!/config/handler.yml.dist -!/config/isolation.yml.dist -!/config/server.yml.dist phpunit.xml credentials.xml diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index 62706ed5abb25dccfa2542004f6ea0fc858bfa0b..8ce924bd190d77c558cedd1ff4a7f04b83af3df5 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,6 +1,6 @@ { "require": { - "magento/mtf": "1.0.0-rc25", + "magento/mtf": "1.0.0-rc26", "php": "~5.5.0|~5.6.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", diff --git a/dev/tests/functional/phpunit.xml.dist b/dev/tests/functional/phpunit.xml.dist index f99b813aa1073903e64d1495ea27d55440cd3547..a88d4b922b6436a27856a7249239805d362043c4 100755 --- a/dev/tests/functional/phpunit.xml.dist +++ b/dev/tests/functional/phpunit.xml.dist @@ -35,7 +35,7 @@ <env name="testsuite_rule_path" value="Magento/Mtf/TestSuite/InjectableTests" /> <env name="log_directory" value="var/log" /> <env name="events_preset" value="base" /> - <env name="module_whitelist" value="Magento_Install,Magento_Core" /> + <env name="module_whitelist" value="Magento_Install" /> <env name="basedir" value="var/log" /> <env name="credentials_file_path" value="./credentials.xml.dist" /> </php> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Messages.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Messages.php index 043937e8dddf1ed692787b6a1c582afc126ddc1a..586f0d9205f9ea6643a7b1e1f6f385260b89064c 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Messages.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Messages.php @@ -70,8 +70,8 @@ class Messages extends Block $elements = $this->_rootElement->getElements($this->successMessage); $messages = []; - foreach ($elements as $key => $element) { - $messages[$key] = $element->getText(); + foreach ($elements as $element) { + $messages[] = $element->getText(); } return count($messages) > 1 ? $messages : $messages[0]; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php index 006da9cb0f663d6efdc1962716245420e80ac863..b11db4365fa2d253ebf571ea4495200274fc74d6 100755 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/FormTabs.php @@ -9,6 +9,7 @@ namespace Magento\Backend\Test\Block\Widget; use Magento\Mtf\Block\BlockFactory; use Magento\Mtf\Block\Mapper; use Magento\Mtf\Client\Locator; +use Magento\Mtf\Client\ElementInterface; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; use Magento\Mtf\Client\BrowserInterface; @@ -84,10 +85,10 @@ class FormTabs extends Form { $context = ($element === null) ? $this->_rootElement : $element; foreach ($tabs as $tabName => $tabFields) { - $tabElement = $this->getTabElement($tabName); + $tab = $this->getTab($tabName); $this->openTab($tabName); - $tabElement->fillFormTab(array_merge($tabFields, $this->unassignedFields), $context); - $this->updateUnassignedFields($tabElement); + $tab->fillFormTab(array_merge($tabFields, $this->unassignedFields), $context); + $this->updateUnassignedFields($tab); } if (!empty($this->unassignedFields)) { $this->fillMissedFields($tabs); @@ -99,13 +100,13 @@ class FormTabs extends Form /** * Update array with fields which aren't assigned to any tab * - * @param Tab $tabElement + * @param Tab $tab */ - protected function updateUnassignedFields(Tab $tabElement) + protected function updateUnassignedFields(Tab $tab) { $this->unassignedFields = array_diff_key( $this->unassignedFields, - array_intersect_key($this->unassignedFields, $tabElement->setFields) + array_intersect_key($this->unassignedFields, $tab->setFields) ); } @@ -120,10 +121,10 @@ class FormTabs extends Form protected function fillMissedFields(array $tabs) { foreach (array_diff_key($this->tabs, $tabs) as $tabName => $tabData) { - $tabElement = $this->getTabElement($tabName); + $tab = $this->getTab($tabName); if ($this->openTab($tabName)) { - $tabElement->fillFormTab($this->unassignedFields, $this->_rootElement); - $this->updateUnassignedFields($tabElement); + $tab->fillFormTab($this->unassignedFields, $this->_rootElement); + $this->updateUnassignedFields($tab); if (empty($this->unassignedFields)) { break; } @@ -154,7 +155,7 @@ class FormTabs extends Form if (null === $fixture) { foreach ($this->tabs as $tabName => $tab) { $this->openTab($tabName); - $tabData = $this->getTabElement($tabName)->getDataFormTab(); + $tabData = $this->getTab($tabName)->getDataFormTab(); $data = array_merge($data, $tabData); } } else { @@ -162,7 +163,7 @@ class FormTabs extends Form $tabsFields = $isHasData ? $this->getFieldsByTabs($fixture) : []; foreach ($tabsFields as $tabName => $fields) { $this->openTab($tabName); - $tabData = $this->getTabElement($tabName)->getDataFormTab($fields, $this->_rootElement); + $tabData = $this->getTab($tabName)->getDataFormTab($fields, $this->_rootElement); $data = array_merge($data, $tabData); } } @@ -249,41 +250,61 @@ class FormTabs extends Form } /** - * Get tab element + * Get tab class. * * @param string $tabName * @return Tab * @throws \Exception */ - public function getTabElement($tabName) + public function getTab($tabName) { $tabClass = $this->tabs[$tabName]['class']; - /** @var Tab $tabElement */ - $tabElement = $this->blockFactory->create($tabClass, ['element' => $this->_rootElement]); - if (!$tabElement instanceof Tab) { + /** @var Tab $tab */ + $tab = $this->blockFactory->create($tabClass, ['element' => $this->_rootElement]); + if (!$tab instanceof Tab) { throw new \Exception('Wrong Tab Class.'); } - $tabElement->setWrapper(isset($this->tabs[$tabName]['wrapper']) ? $this->tabs[$tabName]['wrapper'] : ''); - $tabElement->setMapping(isset($this->tabs[$tabName]['fields']) ? (array)$this->tabs[$tabName]['fields'] : []); + $tab->setWrapper(isset($this->tabs[$tabName]['wrapper']) ? $this->tabs[$tabName]['wrapper'] : ''); + $tab->setMapping(isset($this->tabs[$tabName]['fields']) ? (array)$this->tabs[$tabName]['fields'] : []); - return $tabElement; + return $tab; } /** - * Open tab + * Get tab element. * * @param string $tabName - * @return FormTabs + * @return ElementInterface */ - public function openTab($tabName) + protected function getTabElement($tabName) { $selector = $this->tabs[$tabName]['selector']; $strategy = isset($this->tabs[$tabName]['strategy']) ? $this->tabs[$tabName]['strategy'] : Locator::SELECTOR_CSS; - $tab = $this->_rootElement->find($selector, $strategy); - $tab->click(); + return $this->_rootElement->find($selector, $strategy); + } + /** + * Open tab. + * + * @param string $tabName + * @return FormTabs + */ + public function openTab($tabName) + { + $this->getTabElement($tabName)->click(); return $this; } + + /** + * Check whether tab is visible. + * + * @param string $tabName + * @return bool + */ + public function isTabVisible($tabName) + { + return $this->getTabElement($tabName)->isVisible(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php index 9989b092a6ec8098f398fecaef6dc0979cedbcb0..32e4652e88d005d24688a98b8b68ef9843a417b4 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php @@ -206,7 +206,7 @@ abstract class Grid extends Block * @param array $filters * @throws \Exception */ - private function prepareForSearch(array $filters) + protected function prepareForSearch(array $filters) { foreach ($filters as $key => $value) { if (isset($this->filters[$key])) { diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertBestsellersOnDashboard.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertBestsellersOnDashboard.php index 2db5fe1018056c19944cf804c6d6b46df843db32..a2219508a67bbcd8f9f14f04bb5511a3b44a0a16 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertBestsellersOnDashboard.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertBestsellersOnDashboard.php @@ -31,7 +31,7 @@ class AssertBestsellersOnDashboard extends AbstractConstraint $dashboard->open(); $dashboard->getStoreStatsBlock()->refreshData(); /** @var \Magento\Backend\Test\Block\Dashboard\Tab\Products\Ordered $bestsellersGrid */ - $bestsellersGrid = $dashboard->getStoreStatsBlock()->getTabElement('bestsellers')->getBestsellersGrid(); + $bestsellersGrid = $dashboard->getStoreStatsBlock()->getTab('bestsellers')->getBestsellersGrid(); $products = $order->getEntityId()['products']; foreach ($products as $product) { \PHPUnit_Framework_Assert::assertTrue( diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php index d80a7e75458943f204bdf02d1d266ecc2f971b34..791edb5f5229677ce79b8350e335847162e9944b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php @@ -10,7 +10,6 @@ use Magento\Backend\Test\Block\Widget\Tab; use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\Mtf\Client\Element\SimpleElement; use Magento\Mtf\Client\Element; -use Magento\Mtf\Client\Locator; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; @@ -60,7 +59,7 @@ class AttributeForm extends FormTabs if ($this->isTabVisible($tabName)) { $this->openTab($tabName); $this->expandAllToggles(); - $tabData = $this->getTabElement($tabName)->getDataFormTab(); + $tabData = $this->getTab($tabName)->getDataFormTab(); $data = array_merge($data, $tabData); } } @@ -71,7 +70,7 @@ class AttributeForm extends FormTabs if ($this->isTabVisible($tabName)) { $this->openTab($tabName); $this->expandAllToggles(); - $tabData = $this->getTabElement($tabName)->getDataFormTab($fields, $this->_rootElement); + $tabData = $this->getTab($tabName)->getDataFormTab($fields, $this->_rootElement); $data = array_merge($data, $tabData); } } @@ -104,19 +103,4 @@ class AttributeForm extends FormTabs $this->browser->find($this->pageTitle)->click(); // Handle menu overlap problem return parent::openTab($tabName); } - - /** - * Check if tab is visible. - * - * @param string $tabName - * @return bool - */ - protected function isTabVisible($tabName) - { - $selector = $this->tabs[$tabName]['selector']; - $strategy = isset($this->tabs[$tabName]['strategy']) - ? $this->tabs[$tabName]['strategy'] - : Locator::SELECTOR_CSS; - return $this->_rootElement->find($selector, $strategy)->isVisible(); - } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php index 95b79ed21380b929ca4cae7168505de69bb66536..4308b05b35bc7602516325b0a27f538f37565831 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php @@ -31,6 +31,13 @@ class Configure extends AbstractConfigureBlock */ protected $customOptionsSelector = '#product_composite_configure_fields_options'; + /** + * Product quantity selector. + * + * @var string + */ + protected $qty = '[name="qty"]'; + /** * Selector for "Ok" button. * @@ -53,7 +60,7 @@ class Configure extends AbstractConfigureBlock */ public function setQty($qty) { - $this->_fill($this->dataMapping(['qty' => $qty])); + $this->_rootElement->find($this->qty)->setValue($qty); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php index 55f800b3f67b7f2b0ffc2c1bf73c999ddfb85009..68f3b677cb6f9ccae620a54c78194f986b5478ce 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/ProductOnlineSwitcher.php @@ -27,7 +27,7 @@ class ProductOnlineSwitcher extends SimpleElement * * @var string */ - protected $topPage = './ancestor::body//*[@class="page-main-actions"]'; + protected $topPage = './ancestor::body//*[contains(@class,"page-header")]'; /** * Set value diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php index 988821e4ab89eb152ae29da2bc8b94b13c9af891..d8febacc644781c8d3e0000ce4ce3cbaff009a86 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php @@ -116,7 +116,6 @@ class ProductForm extends FormTabs if ($category) { $tabs['product-details']['category_ids']['value'] = $category->getName(); } - $this->showAdvancedSettings(); $this->fillTabs($tabs, $element); if ($product->hasData('custom_attribute')) { @@ -168,7 +167,9 @@ class ProductForm extends FormTabs */ public function openTab($tabName) { - $this->showAdvancedSettings(); + if (!$this->isTabVisible($tabName)) { + $this->showAdvancedSettings(); + } return parent::openTab($tabName); } @@ -255,12 +256,12 @@ class ProductForm extends FormTabs } /** - * Check tab visibility on Product form. + * Check custom tab visibility on Product form. * * @param string $tabName * @return bool */ - public function isTabVisible($tabName) + public function isCustomTabVisible($tabName) { $tabName = strtolower($tabName); $selector = sprintf($this->customTab, $tabName); @@ -294,7 +295,7 @@ class ProductForm extends FormTabs $data = []; $tabs = $this->getFieldsByTabs($product); foreach ($tabs as $tabName => $fields) { - $tab = $this->getTabElement($tabName); + $tab = $this->getTab($tabName); $this->openTab($tabName); $errors = $tab->getJsErrors(); if (!empty($errors)) { @@ -367,7 +368,7 @@ class ProductForm extends FormTabs */ public function addNewAttribute($tabName = 'product-details') { - $tab = $this->getTabElement($tabName); + $tab = $this->getTab($tabName); if ($tab instanceof ProductTab) { $this->openTab($tabName); $tab->addNewAttribute($tabName); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php index bc5ae4c912f7d1d0697d3d3e9b5ad4e997b2a7cb..165f69f007b7e6325fd6048ed5c3b3fe524e5e9b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php @@ -61,7 +61,7 @@ class AssertProductTemplateGroupOnProductForm extends AbstractConstraint $productBlockForm->fill($productSimple); \PHPUnit_Framework_Assert::assertTrue( - $productEdit->getProductForm()->isTabVisible($attributeSet->getGroup()), + $productEdit->getProductForm()->isCustomTabVisible($attributeSet->getGroup()), "Product Group is absent on Product form tabs." ); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductCompare.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductCompare.xml index 6bfeb6be2b3b4d28f8bffd68a97277d745072cdf..a7951c8c2a861782a4cc3716c2fce45aa29e1552 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductCompare.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductCompare.xml @@ -8,7 +8,7 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd"> <page name="CatalogProductCompare" area="Product" mca="catalog/product_compare/index" module="Magento_Catalog"> <block name="compareProductsBlock" class="Magento\Catalog\Test\Block\Product\Compare\ListCompare" locator=".column.main" strategy="css selector"/> - <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages .messages" strategy="css selector"/> + <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages" strategy="css selector"/> <block name="widgetView" class="Magento\Widget\Test\Block\WidgetView" locator=".column.main .widget" strategy="css selector"/> </page> </config> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml index ff3443eee0b503bc7c5d17caed6389d4b8226690..dbe16275a58a0f5d5d662b1c70d69c6907cabe2d 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml @@ -14,7 +14,7 @@ <block name="upsellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Upsell" locator=".block.upsell" strategy="css selector" /> <block name="crosssellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Crosssell" locator=".block.crosssell" strategy="css selector" /> <block name="downloadableLinksBlock" class="Magento\Downloadable\Test\Block\Catalog\Product\View\Links" locator="[data-container-for=downloadable-links]" strategy="css selector" /> - <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages .messages" strategy="css selector" /> + <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages" strategy="css selector" /> <block name="titleBlock" class="Magento\Theme\Test\Block\Html\Title" locator=".page-title-wrapper h1.page-title .base" strategy="css selector" /> <block name="widgetView" class="Magento\Widget\Test\Block\WidgetView" locator=".column.main .widget" strategy="css selector" /> </page> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php index ea7f49ced512bf92b862f9b249cec0f1f6af3f2f..0f38833cdf94be526354794803141c8922e667d6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php @@ -84,7 +84,6 @@ class MassProductUpdateTest extends Injectable */ public function test(CatalogProductSimple $initialProduct, CatalogProductSimple $product, $configData) { - $this->markTestIncomplete('Bug: MAGETWO-37154'); $this->configData = $configData; // Preconditions diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php index 7448eb5eb32818475cdf0dad72b76306af6a9048..d856f2bdd684ae4ebebf4ca2f8ce592a27e80173 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php @@ -129,7 +129,7 @@ class ProductTypeSwitchingOnUpdateTest extends Injectable { $this->catalogProductEdit->getProductForm()->openTab('variations'); /** @var Config $variationsTab */ - $variationsTab = $this->catalogProductEdit->getProductForm()->getTabElement('variations'); + $variationsTab = $this->catalogProductEdit->getProductForm()->getTab('variations'); $variationsTab->deleteAttributes(); } @@ -142,7 +142,7 @@ class ProductTypeSwitchingOnUpdateTest extends Injectable { $this->catalogProductEdit->getProductForm()->openTab('downloadable_information'); /** @var Downloadable $downloadableInfoTab */ - $downloadableInfoTab = $this->catalogProductEdit->getProductForm()->getTabElement('downloadable_information'); + $downloadableInfoTab = $this->catalogProductEdit->getProductForm()->getTab('downloadable_information'); $downloadableInfoTab->getDownloadableBlock('Links')->clearDownloadableData(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php index 38d6ebdf1b59da446da19ab4b4ac4d083e3f6aa9..92811b864335f16cf79251c83a38ece37f5a239f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeOnProductPageStep.php @@ -6,8 +6,10 @@ namespace Magento\Catalog\Test\TestStep; -use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; +use Magento\Mtf\ObjectManager; use Magento\Mtf\TestStep\TestStepInterface; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; /** * Click "Save" button on attribute form on product page. @@ -21,13 +23,34 @@ class SaveAttributeOnProductPageStep implements TestStepInterface */ protected $catalogProductEdit; + /** + * Product attribute fixture. + * + * @var CatalogProductAttribute + */ + protected $attribute; + + /** + * Object manager instance. + * + * @var ObjectManager + */ + protected $objectManager; + /** * @constructor * @param CatalogProductEdit $catalogProductEdit + * @param CatalogProductAttribute $attribute + * @param ObjectManager $objectManager */ - public function __construct(CatalogProductEdit $catalogProductEdit) - { + public function __construct( + CatalogProductEdit $catalogProductEdit, + CatalogProductAttribute $attribute, + ObjectManager $objectManager + ) { $this->catalogProductEdit = $catalogProductEdit; + $this->attribute = $attribute; + $this->objectManager = $objectManager; } /** @@ -39,4 +62,17 @@ class SaveAttributeOnProductPageStep implements TestStepInterface { $this->catalogProductEdit->getProductForm()->saveAttributeForm(); } + + /** + * Delete attribute after test. + * + * @return void + */ + public function cleanup() + { + $this->objectManager->create( + 'Magento\Catalog\Test\TestStep\DeleteAttributeStep', + ['attribute' => $this->attribute] + )->run(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php index 55c0d8716700429b54f48933a23b73e3a0cfeaf9..a298c0eba871a947324f370f43ee3f0be4a4ee2e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeStep.php @@ -73,6 +73,6 @@ class SaveAttributeStep implements TestStepInterface $this->objectManager->create( 'Magento\Catalog\Test\TestStep\DeleteAttributeStep', ['attribute' => $this->attribute] - ); + )->run(); } } diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php index dac358d1f99073162c48fd2d77d8ee971309bc98..5944e457a3549973457e82da91ced553de34ad55 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php @@ -31,7 +31,6 @@ class CreateCatalogRuleTest extends AbstractCatalogRuleEntityTest const TEST_TYPE = 'acceptance_test'; const MVP = 'yes'; const DOMAIN = 'MX'; - const TO_MAINTAIN = 'yes'; // Selecting conditions in parallel mode /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php index 2cfdcb95eafcc3c2196dc11018f788c5f916729d..8b86e8e788f54f67821cb0996311cb1e3b9aa760 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Sidebar.php @@ -11,31 +11,30 @@ use Magento\Mtf\Client\Locator; use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Sidebar - * Mini shopping cart block + * Mini shopping cart block. */ class Sidebar extends Block { /** - * Quantity input selector + * Quantity input selector. * * @var string */ protected $qty = '//*[@class="product"]/*[@title="%s"]/following-sibling::*//*[contains(@class,"item-qty")]'; /** - * Mini cart link selector + * Mini cart link selector. * * @var string */ protected $cartLink = 'a.showcart'; /** - * Mini cart content selector + * Mini cart content selector. * * @var string */ - protected $cartContent = 'div.minicart'; + protected $cartContent = 'div.block-minicart'; /** * Product list in mini shopping cart. @@ -45,21 +44,21 @@ class Sidebar extends Block protected $cartProductList = './/*[contains(@role, "dialog") and not(contains(@style,"display: none;"))]'; /** - * Selector for cart item block + * Selector for cart item block. * * @var string */ protected $cartProductName = '//*[@id="mini-cart"]//li[.//a[normalize-space(text())="%s"]]'; /** - * Counter qty locator + * Counter qty locator. * * @var string */ - protected $counterQty = './/span[@class="counter qty"]'; + protected $counterQty = './/div[@class="minicart-wrapper"]//span[@class="counter qty"]'; /** - * Open mini cart + * Open mini cart. * * @return void */ @@ -72,7 +71,7 @@ class Sidebar extends Block } /** - * Wait counter qty visibility + * Wait counter qty visibility. * * @return void */ @@ -89,7 +88,7 @@ class Sidebar extends Block } /** - * Get product quantity + * Get product quantity. * * @param string $productName * @return string @@ -102,7 +101,7 @@ class Sidebar extends Block } /** - * Get cart item block + * Get cart item block. * * @param FixtureInterface $product * @return Item diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Billing.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Billing.php index 018dcbcac4b92b9913baf79ca1431f5ddcb8af51..f4df8ae791b970291e26684656e2199df91d1445 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Billing.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Billing.php @@ -11,34 +11,33 @@ use Magento\Customer\Test\Fixture\Customer; use Magento\Mtf\Block\Form; /** - * Class Billing - * One page checkout status billing block + * One page checkout status billing block. */ class Billing extends Form { /** - * Continue checkout button + * Continue checkout button. * * @var string */ protected $continue = '#billing-buttons-container button'; /** - * 'Ship to different address' radio button + * 'Ship to different address' radio button. * * @var string */ protected $useForShipping = '[id="billing:use_for_shipping_no"]'; /** - * Wait element + * Wait element. * * @var string */ protected $waitElement = '.loading-mask'; /** - * Fill billing address + * Fill billing address. * * @param Address $billingAddress * @param bool $isShippingAddress @@ -49,6 +48,7 @@ class Billing extends Form $isShippingAddress = false ) { if ($billingAddress) { + //@TODO: MAGETWO-34756 sleep(5); $this->fill($billingAddress); } @@ -59,7 +59,7 @@ class Billing extends Form } /** - * Click continue on billing information block + * Click continue on billing information block. * * @return void */ diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Login.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Login.xml index 6b1eed8e9a3ac1f88eff3d8e89c1e00c9cf8237f..ad03998b1773012e9d06a78a066e34950432a978 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Login.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Login.xml @@ -6,10 +6,9 @@ */ --> <mapping strict="1"> - <wrapper>login</wrapper> <fields> <email> - <selector>[name='login[username]']</selector> + <selector>[name='username']</selector> </email> <password /> </fields> diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Page/CheckoutCart.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/Page/CheckoutCart.xml index 41c6ca7910406fe79761a8c1fcab416e25053da1..894ec782a4b81d7760ef59790b90cc1c477f899e 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Page/CheckoutCart.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Page/CheckoutCart.xml @@ -9,7 +9,7 @@ <page name="CheckoutCart" mca="checkout/cart/index" module="Magento_Checkout"> <block name="cartBlock" class="Magento\Checkout\Test\Block\Cart" locator="//div[contains(@class, 'column main')]" strategy="xpath"/> <block name="cartEmptyBlock" class="Magento\Checkout\Test\Block\Cart\CartEmpty" locator=".cart-empty" strategy="css selector"/> - <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".messages .messages" strategy="css selector"/> + <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages" strategy="css selector"/> <block name="shippingBlock" class="Magento\Checkout\Test\Block\Cart\Shipping" locator=".block.shipping" strategy="css selector"/> <block name="totalsBlock" class="Magento\Checkout\Test\Block\Cart\Totals" locator="#shopping-cart-totals-table" strategy="css selector"/> <block name="crosssellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Crosssell" locator="//div[contains(@class, 'block')][contains(@class, 'crosssell')]" strategy="xpath"/> diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php index 97c2f87e365b2bda7222f6813f53079f25ad0c7e..b20b4cd6f58fea4e4231d4b2ebe7ac9fc5c3f0f7 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php @@ -6,52 +6,65 @@ namespace Magento\Checkout\Test\TestStep; -use Magento\Checkout\Test\Page\CheckoutOnepage; -use Magento\Customer\Test\Fixture\Customer; use Magento\Mtf\TestStep\TestStepInterface; +use Magento\Customer\Test\Fixture\Customer; +use Magento\Checkout\Test\Page\CheckoutOnepage; +use Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep; /** - * Class SelectCheckoutMethodStep - * Selecting checkout method + * Selecting checkout method. */ class SelectCheckoutMethodStep implements TestStepInterface { /** - * Onepage checkout page + * Onepage checkout page. * * @var CheckoutOnepage */ protected $checkoutOnepage; /** - * Checkout method + * Checkout method. * * @var string */ protected $checkoutMethod; /** - * Customer fixture + * Customer fixture. * * @var Customer */ protected $customer; + /** + * Logout customer on frontend step. + * + * @var LogoutCustomerOnFrontendStep + */ + protected $logoutCustomerOnFrontend; + /** * @constructor * @param CheckoutOnepage $checkoutOnepage * @param Customer $customer + * @param LogoutCustomerOnFrontendStep $logoutCustomerOnFrontend * @param string $checkoutMethod */ - public function __construct(CheckoutOnepage $checkoutOnepage, Customer $customer, $checkoutMethod) - { + public function __construct( + CheckoutOnepage $checkoutOnepage, + Customer $customer, + LogoutCustomerOnFrontendStep $logoutCustomerOnFrontend, + $checkoutMethod + ) { $this->checkoutOnepage = $checkoutOnepage; - $this->checkoutMethod = $checkoutMethod; $this->customer = $customer; + $this->logoutCustomerOnFrontend = $logoutCustomerOnFrontend; + $this->checkoutMethod = $checkoutMethod; } /** - * Run step that selecting checkout method + * Run step that selecting checkout method. * * @return void * @throws \Exception @@ -71,4 +84,16 @@ class SelectCheckoutMethodStep implements TestStepInterface break; } } + + /** + * Logout customer on fronted. + * + * @return void + */ + public function cleanup() + { + if ($this->checkoutMethod === 'login') { + $this->logoutCustomerOnFrontend->run(); + } + } } diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.php index 5338aaaead06883ad68c7b8855d962ceff004772..c9d3f40314a2b957c8b398e238a9143d20050e88 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/PageForm.php @@ -51,7 +51,7 @@ class PageForm extends FormTabs { $this->openTab('content'); /** @var \Magento\Cms\Test\Block\Adminhtml\Page\Edit\Tab\Content $contentTab */ - $contentTab = $this->getTabElement('content'); + $contentTab = $this->getTab('content'); /** @var \Magento\Cms\Test\Block\Adminhtml\Wysiwyg\Config $config */ $contentTab->clickInsertVariable(); $config = $contentTab->getWysiwygConfig(); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php index 630fb675ac2b0383bd9a5aa7974519a147146527..1c7edf16fe5f56fa2bbca505492f728c8a8e3063 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php @@ -41,7 +41,7 @@ class AssertProductAttributeAbsenceInVariationsSearch extends AbstractConstraint $productGrid->getGridPageActionBlock()->addProduct('simple'); /** @var VariationsTab $variationsTab */ - $variationsTab = $newProductPage->getProductForm()->getTabElement(self::TAB_VARIATIONS); + $variationsTab = $newProductPage->getProductForm()->getTab(self::TAB_VARIATIONS); $variationsTab->showContent(); /** @var AttributeBlock $attributesBlock */ $attributesBlock = $variationsTab->getAttributeBlock(); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php index 6db64a68914c1d83a130c21b9175fd8a0efc27ef..9c1d9b988ed215b235da978bd414f59422be0d52 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeIsConfigurable.php @@ -38,7 +38,7 @@ class AssertProductAttributeIsConfigurable extends AbstractConstraint $productBlockForm->openTab('variations'); /** @var TabVariation $tabVariation */ - $tabVariation = $productBlockForm->getTabElement('variations'); + $tabVariation = $productBlockForm->getTab('variations'); $configurableAttributeSelector = $tabVariation->getAttributeBlock()->getAttributeSelector(); \PHPUnit_Framework_Assert::assertTrue( $configurableAttributeSelector->isExistAttributeInSearchResult($attributeSearch), diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php index 7fe761407b715695ee64edd96ca42fa1b1d69292..3d6bab9ab474c3b1691afd0c186e303eccbe2bc3 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php @@ -191,7 +191,7 @@ class UpdateConfigurableProductStep implements TestStepInterface { $productForm = $this->catalogProductEdit->getProductForm(); $productForm->openTab('variations'); - $productForm->getTabElement('variations')->deleteAttributes(); + $productForm->getTab('variations')->deleteAttributes(); $this->catalogProductEdit->getProductForm()->fill($product); } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php index 6a034af9855a4a9a587f4c159361fb2089b1cd42..78bb463909c931220e5e74f4a1c083ea042f8360 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php @@ -69,7 +69,7 @@ class CustomerForm extends FormTabs } if (null !== $address) { $this->openTab('addresses'); - $this->getTabElement('addresses')->fillAddresses($address); + $this->getTab('addresses')->fillAddresses($address); } return $this; @@ -92,7 +92,7 @@ class CustomerForm extends FormTabs } if (null !== $address) { $this->openTab('addresses'); - $this->getTabElement('addresses')->updateAddresses($address); + $this->getTab('addresses')->updateAddresses($address); } return $this; @@ -112,7 +112,7 @@ class CustomerForm extends FormTabs $data = ['customer' => $customer->hasData() ? parent::getData($customer) : parent::getData()]; if (null !== $address) { $this->openTab('addresses'); - $data['addresses'] = $this->getTabElement('addresses')->getDataAddresses($address); + $data['addresses'] = $this->getTab('addresses')->getDataAddresses($address); } return $data; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml index 6e981074744ac7547c09bf48e49ccaa509070f63..e379604530bcdc5cbafede7c11370a74e5639b94 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml @@ -114,7 +114,7 @@ <field name="street" xsi:type="string">7700 W. Parmer Lane Bldg. D</field> <field name="city" xsi:type="string">Austin</field> <field name="region_id" xsi:type="string">Texas</field> - <field name="postcode" xsi:type="string">78729 </field> + <field name="postcode" xsi:type="string">78729</field> <field name="country_id" xsi:type="string">United States</field> <field name="telephone" xsi:type="string">512-691-4400</field> <field name="default_billing" xsi:type="string">Yes</field> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml index 94af84c9ee9de007f64a5863a25448b22a5ab818..e381864c2850e00139e306b693033ed0c3ada15d 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml @@ -14,6 +14,7 @@ <data name="customer/dataSet" xsi:type="string">customer_UK_1_default_billing_address</data> <data name="vatId/data/vat_id" xsi:type="string">584451913</data> <data name="customerGroup" xsi:type="string">valid_intra_union_group</data> + <data name="tag" xsi:type="string">test_type:3rd_party_test</data> <constraint name="Magento\Customer\Test\Constraint\AssertCustomerAddressSuccessSaveMessage" /> <constraint name="Magento\Customer\Test\Constraint\AssertCustomerForm" /> </variation> @@ -24,6 +25,7 @@ <data name="customer/dataSet" xsi:type="string">customer_UK_1_default_billing_address</data> <data name="vatId/data/vat_id" xsi:type="string">123456789</data> <data name="customerGroup" xsi:type="string">invalid_group</data> + <data name="tag" xsi:type="string">test_type:3rd_party_test</data> <constraint name="Magento\Customer\Test\Constraint\AssertCustomerAddressSuccessSaveMessage" /> <constraint name="Magento\Customer\Test\Constraint\AssertCustomerForm" /> </variation> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php index a2fdc4922e7a127cb958d10787802e0807ff3429..c9dc9642b47e76b0bbd70200ca0f945b54f6a240 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php @@ -6,10 +6,8 @@ namespace Magento\Customer\Test\TestCase; -use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\Customer; use Magento\Customer\Test\Page\CustomerAccountIndex; -use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Mtf\TestCase\Injectable; /** @@ -35,20 +33,6 @@ class DeleteCustomerAddressTest extends Injectable const DOMAIN = 'CS'; /* end tags */ - /** - * Cms index page. - * - * @var CmsIndex - */ - protected $cmsIndex; - - /** - * Customer login page. - * - * @var CustomerAccountLogin - */ - protected $customerAccountLogin; - /** * Customer index page. * @@ -59,18 +43,12 @@ class DeleteCustomerAddressTest extends Injectable /** * Prepare pages for test. * - * @param CustomerAccountLogin $customerAccountLogin - * @param CmsIndex $cmsIndex * @param CustomerAccountIndex $customerAccountIndex * @return void */ public function __inject( - CustomerAccountLogin $customerAccountLogin, - CmsIndex $cmsIndex, CustomerAccountIndex $customerAccountIndex ) { - $this->cmsIndex = $cmsIndex; - $this->customerAccountLogin = $customerAccountLogin; $this->customerAccountIndex = $customerAccountIndex; } @@ -88,9 +66,10 @@ class DeleteCustomerAddressTest extends Injectable $addressToDelete = $customer->getDataFieldConfig('address')['source']->getAddresses()[1]; // Steps: - $this->cmsIndex->open(); - $this->cmsIndex->getLinksBlock()->openLink("Log In"); - $this->customerAccountLogin->getLoginBlock()->login($customer); + $this->objectManager->create( + 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', + ['customer' => $customer] + )->run(); $this->customerAccountIndex->getAccountMenuBlock()->openMenuItem('Address Book'); $this->customerAccountIndex->getAdditionalAddressBlock()->deleteAdditionalAddress($addressToDelete); diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php index 95561a50fd930f3668495bbceccc0f91fdc1c748..3cd67136fbb23d00d5c60996725ea7d70434c119 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php @@ -70,13 +70,7 @@ class LoginCustomerOnFrontendStep implements TestStepInterface */ public function run() { - $this->cmsIndex->open(); - $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - if ($this->cmsIndex->getLinksBlock()->isLinkVisible("Log Out")) { - $this->cmsIndex->getLinksBlock()->openLink("Log Out"); - $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); - $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - } + $this->logoutCustomerOnFrontend->run(); $this->cmsIndex->getLinksBlock()->openLink("Log In"); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); $this->customerAccountLogin->getLoginBlock()->login($this->customer); diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php index c05e45a1fb094d57f26bc437f00cce1a7ffd253e..21a17180e7e0fac2b637abca11a85cc7f9d2ba8a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php @@ -7,43 +7,64 @@ namespace Magento\Customer\Test\TestStep; use Magento\Cms\Test\Page\CmsIndex; +use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Mtf\TestStep\TestStepInterface; /** - * Class LogoutCustomerOnFrontendStep - * Logout customer on frontend + * Logout customer on frontend. */ class LogoutCustomerOnFrontendStep implements TestStepInterface { /** - * Cms index page + * Logout page title. + */ + const LOGOUT_PAGE_TITLE = 'You are now logged out'; + + /** + * Cms index page. * * @var CmsIndex */ protected $cmsIndex; + /** + * Customer logout page. + * + * @var CustomerAccountLogout + */ + protected $customerAccountLogout; + /** * @constructor * @param CmsIndex $cmsIndex + * @param CustomerAccountLogout $customerAccountLogout */ - public function __construct(CmsIndex $cmsIndex) + public function __construct(CmsIndex $cmsIndex, CustomerAccountLogout $customerAccountLogout) { $this->cmsIndex = $cmsIndex; + $this->customerAccountLogout = $customerAccountLogout; } /** - * Logout customer + * Logout customer. * * @return void */ public function run() { - $this->cmsIndex->open(); - $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - if ($this->cmsIndex->getLinksBlock()->isLinkVisible("Log Out")) { - $this->cmsIndex->getLinksBlock()->openLink("Log Out"); + /* @TODO: MAGETWO-37391 + * $this->cmsIndex->open(); + * $this->cmsIndex->getCmsPageBlock()->waitPageInit(); + * if ($this->cmsIndex->getLinksBlock()->isLinkVisible("Log Out")) { + * $this->cmsIndex->getLinksBlock()->openLink("Log Out"); + * $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); + * $this->cmsIndex->getCmsPageBlock()->waitPageInit(); + * } + */ + $this->customerAccountLogout->open(); + if (self::LOGOUT_PAGE_TITLE == $this->cmsIndex->getCmsPageBlock()->getPageTitle()) { $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); - $this->cmsIndex->getCmsPageBlock()->waitPageInit(); } + $this->cmsIndex->getCmsPageBlock()->waitPageInit(); } } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php index 26105a20e15e4bb184d09bd4784c5269d8dc91dd..18a366d47dfdad8c6a7da738c08b657e9aac8260 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php @@ -30,6 +30,7 @@ class CheckoutWithGiftMessagesTest extends Scenario /* tags */ const MVP = 'no'; const DOMAIN = 'CS'; + const TO_MAINTAIN = 'yes'; // Consider variation #2 to work correctly with Virtual products /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php index 1ab4ba94b341a23fab8d9636d167e3848652913a..caf67686a3604ff01447238c7ed9fab3a68e3b60 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php @@ -31,7 +31,6 @@ class ActivateIntegrationEntityTest extends Injectable /* tags */ const MVP = 'yes'; const DOMAIN = 'PS'; - const TO_MAINTAIN = 'yes'; /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php index 7eb3c3c97cbe944e14410a501abebfed92815578..3a45b93f0655ddcff4f60e01733b513d5a1080d8 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertCouponReportResult.php @@ -16,10 +16,6 @@ use Magento\Mtf\Constraint\AbstractConstraint; */ class AssertCouponReportResult extends AbstractConstraint { - /* tags */ - const SEVERITY = 'low'; - /* end tags */ - /** * Assert coupon info in report: code, rule name, subtotal, discount on coupons report page * diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php index 2770831f3b6274ec91c50f0c54f3bc3bb0e43b54..3e8e843404e537c73651de2ac1ac7e4ffeaace3b 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php @@ -36,6 +36,7 @@ class AbandonedCartsReportEntityTest extends Injectable /* tags */ const MVP = 'no'; const DOMAIN = 'MX'; + const STABLE = 'no'; /* end tags */ /** @@ -86,7 +87,6 @@ class AbandonedCartsReportEntityTest extends Injectable */ public function test($products, Customer $customer) { - $this->markTestIncomplete('Bug: MAGETWO-31737'); // Precondition $products = $this->createProducts($products); $customer->persist(); diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php index 7b781541ab287a62628e7df33081f5bdd026d4ad..734f575760920d6ae9adcfb93d61ecc5a9f489af 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php @@ -10,8 +10,6 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\Customer; -use Magento\Customer\Test\Page\CustomerAccountLogin; -use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Mtf\Client\BrowserInterface; use Magento\Mtf\TestCase\Injectable; @@ -44,13 +42,6 @@ class ProductsInCartReportEntityTest extends Injectable */ protected $cmsIndex; - /** - * Customer login page - * - * @var CustomerAccountLogin - */ - protected $customerAccountLogin; - /** * Product view page * @@ -58,13 +49,6 @@ class ProductsInCartReportEntityTest extends Injectable */ protected $catalogProductView; - /** - * Customer logout page - * - * @var CustomerAccountLogout - */ - protected $customerAccountLogout; - /** * Prepare data * @@ -82,20 +66,14 @@ class ProductsInCartReportEntityTest extends Injectable * Injection data * * @param CmsIndex $cmsIndex - * @param CustomerAccountLogin $customerAccountLogin - * @param CustomerAccountLogout $customerAccountLogout * @param CatalogProductView $catalogProductView * @return void */ public function __inject( CmsIndex $cmsIndex, - CustomerAccountLogin $customerAccountLogin, - CustomerAccountLogout $customerAccountLogout, CatalogProductView $catalogProductView ) { $this->cmsIndex = $cmsIndex; - $this->customerAccountLogin = $customerAccountLogin; - $this->customerAccountLogout = $customerAccountLogout; $this->catalogProductView = $catalogProductView; } @@ -118,8 +96,10 @@ class ProductsInCartReportEntityTest extends Injectable $product->persist(); //Steps - $this->cmsIndex->open()->getLinksBlock()->openLink("Log In"); - $this->customerAccountLogin->getLoginBlock()->login($customer); + $this->objectManager->create( + 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', + ['customer' => $customer] + )->run(); $productUrl = $_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'; $browser->open($productUrl); $this->catalogProductView->getViewBlock()->addToCart($product); @@ -137,6 +117,6 @@ class ProductsInCartReportEntityTest extends Injectable */ public function tearDown() { - $this->customerAccountLogout->open(); + $this->objectManager->create('Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep')->run(); } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml index e848bde903491bbff4ddb54d6f760373619f001c..c2b2cfec986dea022d2b9ca7fb106ce93879d783 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml @@ -6,18 +6,18 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd"> - <testCase name="Magento\Reports\Test\TestCase\ProductsInCartReportEntity"> - <variation name="ProductsInCartReportEntityVariation1"> - <data name="product/dataSet" xsi:type="string">default</data> - <data name="carts" xsi:type="string">1</data> - <data name="isGuest" xsi:type="string">0</data> - <constraint name="Magento\Reports\Test\Constraint\AssertProductInCartResult"/> - </variation> - <variation name="ProductsInCartReportEntityVariation2"> - <data name="product/dataSet" xsi:type="string">default</data> - <data name="carts" xsi:type="string">2</data> - <data name="isGuest" xsi:type="string">1</data> - <constraint name="Magento\Reports\Test\Constraint\AssertProductInCartResult"/> - </variation> - </testCase> + <testCase name="Magento\Reports\Test\TestCase\ProductsInCartReportEntityTest"> + <variation name="ProductsInCartReportEntityVariation1"> + <data name="product/dataSet" xsi:type="string">default</data> + <data name="carts" xsi:type="string">1</data> + <data name="isGuest" xsi:type="string">0</data> + <constraint name="Magento\Reports\Test\Constraint\AssertProductInCartResult" /> + </variation> + <variation name="ProductsInCartReportEntityVariation2"> + <data name="product/dataSet" xsi:type="string">default</data> + <data name="carts" xsi:type="string">2</data> + <data name="isGuest" xsi:type="string">1</data> + <constraint name="Magento\Reports\Test\Constraint\AssertProductInCartResult" /> + </variation> + </testCase> </config> diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php index af35c7178b0a0fb24b832e7a13d167a22fe5d9b9..fe6ddf9400e7ea3d150c4767d5b65e05951b01cf 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php @@ -34,6 +34,7 @@ class ViewedProductsReportEntityTest extends Injectable /* tags */ const MVP = 'no'; const DOMAIN = 'MX'; + const STABLE = 'no'; /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php index 6de4b725cf6df1c8c3d40da3ecde3eb09b6aa501..193a24f47bb59609887e9b7362120219d2a5b0d5 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Constraint/AssertProductReviewInGridOnCustomerPage.php @@ -45,7 +45,7 @@ class AssertProductReviewInGridOnCustomerPage extends AbstractConstraint $customerIndexEdit->getCustomerForm()->openTab('product_reviews'); $filter = $assertProductReviewInGrid->prepareFilter($product, $this->prepareData($review, $reviewInitial)); /** @var ReviewsGrid $reviewsGrid */ - $reviewsGrid = $customerIndexEdit->getCustomerForm()->getTabElement('product_reviews')->getReviewsGrid(); + $reviewsGrid = $customerIndexEdit->getCustomerForm()->getTab('product_reviews')->getReviewsGrid(); $reviewsGrid->search($filter); unset($filter['visible_in']); \PHPUnit_Framework_Assert::assertTrue( diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php index 4f3c18759ca8c7a0048b971abd63e814c0395845..67da4b208c8fd0825c1594a6985a7d46205628e9 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php @@ -8,11 +8,9 @@ namespace Magento\Review\Test\TestCase; use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Magento\Catalog\Test\Page\Product\CatalogProductView; -use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\Customer; use Magento\Customer\Test\Page\Adminhtml\CustomerIndex; use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit; -use Magento\Customer\Test\Page\CustomerAccountLogin; use Magento\Review\Test\Fixture\Review; use Magento\Review\Test\Page\Adminhtml\RatingEdit; use Magento\Review\Test\Page\Adminhtml\RatingIndex; @@ -67,13 +65,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable */ protected $customerIndexEdit; - /** - * Customer login page - * - * @var CustomerAccountLogin - */ - protected $customerAccountLogin; - /** * Catalog product view page * @@ -88,13 +79,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable */ protected $browser; - /** - * Cms index page - * - * @var CmsIndex - */ - protected $cmsIndex; - /** * Backend rating grid page * @@ -140,8 +124,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable * * @param CustomerIndexEdit $customerIndexEdit * @param CustomerIndex $customerIndex - * @param CmsIndex $cmsIndex - * @param CustomerAccountLogin $customerAccountLogin * @param CatalogProductView $catalogProductView * @param BrowserInterface $browser * @param RatingIndex $ratingIndex @@ -152,8 +134,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable public function __inject( CustomerIndexEdit $customerIndexEdit, CustomerIndex $customerIndex, - CmsIndex $cmsIndex, - CustomerAccountLogin $customerAccountLogin, CatalogProductView $catalogProductView, BrowserInterface $browser, RatingIndex $ratingIndex, @@ -162,8 +142,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable ) { $this->customerIndexEdit = $customerIndexEdit; $this->customerIndex = $customerIndex; - $this->cmsIndex = $cmsIndex; - $this->customerAccountLogin = $customerAccountLogin; $this->catalogProductView = $catalogProductView; $this->browser = $browser; $this->ratingIndex = $ratingIndex; @@ -201,7 +179,7 @@ class ManageProductReviewFromCustomerPageTest extends Injectable 'title' => $reviewInitial->getTitle(), 'sku' => $product->getSku(), ]; - $this->customerIndexEdit->getCustomerForm()->getTabElement('product_reviews')->getReviewsGrid() + $this->customerIndexEdit->getCustomerForm()->getTab('product_reviews')->getReviewsGrid() ->searchAndOpen($filter); $this->reviewEdit->getReviewForm()->fill($review); $this->reviewEdit->getPageActions()->save(); @@ -217,11 +195,10 @@ class ManageProductReviewFromCustomerPageTest extends Injectable */ protected function login(Customer $customer) { - $this->cmsIndex->open(); - if (!$this->cmsIndex->getLinksBlock()->isLinkVisible('Log Out')) { - $this->cmsIndex->getLinksBlock()->openLink("Log In"); - $this->customerAccountLogin->getLoginBlock()->login($customer); - } + $this->objectManager->create( + 'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep', + ['customer' => $customer] + )->run(); } /** diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php index ad745c1ae6cb41e7c4b8076a9c6ad26bb632583a..28dff5a865f3726dd66539c473101a8fd193f982 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php @@ -144,7 +144,7 @@ class UpdateProductReviewEntityOnProductPageTest extends Injectable 'title' => $this->reviewInitial->getTitle(), 'sku' => $product->getSku(), ]; - $this->catalogProductEdit->getProductForm()->getTabElement('product_reviews')->getReviewsGrid() + $this->catalogProductEdit->getProductForm()->getTab('product_reviews')->getReviewsGrid() ->searchAndOpen($filter); $this->reviewEdit->getReviewForm()->fill($review); $this->reviewEdit->getPageActions()->save(); diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/StatusGrid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/StatusGrid.php index f0fa33ca3a36d6e9e94681be8617915cee97c5f8..600158767897beed5ddc0536b061cd8ff9a886cf 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/StatusGrid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/StatusGrid.php @@ -49,7 +49,6 @@ class StatusGrid extends \Magento\Backend\Test\Block\Widget\Grid */ public function searchAndUnassign(array $filter) { - $this->openFilterBlock(); $this->search($filter); $selectItem = $this->_rootElement->find($this->unassignLink); if ($selectItem->isVisible()) { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php index 986750e32ea542039a1f5bec8275c4df478542a3..0de9511044caac7d63db1cb1856fa757363f08de 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertInvoiceInInvoicesTab.php @@ -36,7 +36,7 @@ class AssertInvoiceInInvoicesTab extends AbstractConstraint $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]); $salesOrderView->getOrderForm()->openTab('invoices'); /** @var Grid $grid */ - $grid = $salesOrderView->getOrderForm()->getTabElement('invoices')->getGridBlock(); + $grid = $salesOrderView->getOrderForm()->getTab('invoices')->getGridBlock(); $amount = $order->getPrice(); foreach ($ids['invoiceIds'] as $key => $invoiceId) { $filter = [ @@ -46,7 +46,7 @@ class AssertInvoiceInInvoicesTab extends AbstractConstraint ]; $grid->search($filter); $filter['amount_from'] = number_format($amount[$key]['grand_invoice_total'], 2); - $filter['amount_to'] = number_format($amount[$key]['grand_invoice_total'], 2); + unset($filter['amount_to']); \PHPUnit_Framework_Assert::assertTrue( $grid->isRowVisible($filter, false, false), 'Invoice is absent on invoices tab.' diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php index f35278c78f1d6c1a5d97fe3eda42bd2cb7b2ec75..972c94f56fce098ea6482f687b0d87a2bfa3f8da 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php @@ -36,7 +36,7 @@ class AssertRefundInCreditMemoTab extends AbstractConstraint $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]); $salesOrderView->getOrderForm()->openTab('creditmemos'); /** @var Grid $grid */ - $grid = $salesOrderView->getOrderForm()->getTabElement('creditmemos')->getGridBlock(); + $grid = $salesOrderView->getOrderForm()->getTab('creditmemos')->getGridBlock(); $amount = $order->getPrice(); foreach ($ids['creditMemoIds'] as $key => $creditMemoId) { $filter = [ diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Curl.php index 7d993cb5f0094f6f9c9982314b44c83240402f88..c5eb13dbb4a38b77958dba4e233e26baa1e9ae91 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Handler/OrderInjectable/Curl.php @@ -317,9 +317,9 @@ class Curl extends AbstractCurl implements OrderInjectableInterface protected function prepareOrderProductsData(array $data) { $result = []; - foreach ($data['products'] as $value) { - if (isset($value->getCheckoutData()['qty'])) { - $result[$value->getId()] = ['qty' => ['qty' => $value->getCheckoutData()['qty']]]; + foreach ($data['products'] as $product) { + if (isset($product->getCheckoutData()['qty'])) { + $result[$product->getId()] = ['qty' => ['qty' => $product->getCheckoutData()['qty']]]; } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderInvoiceView.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderInvoiceView.xml index 25d1ce48de08253028a6d89b812f4e6b79192840..20d00da9b6a5f14191dbd1c8b5168dd9f4576c6e 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderInvoiceView.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderInvoiceView.xml @@ -9,6 +9,6 @@ <page name="OrderInvoiceView" area="Adminhtml" mca="sales/order_invoice/view" module="Magento_Sales"> <block name="titleBlock" class="Magento\Theme\Test\Block\Html\Title" locator=".page-title-wrapper" strategy="css selector"/> <block name="pageActions" class="Magento\Sales\Test\Block\Adminhtml\Order\Actions" locator=".page-actions" strategy="css selector"/> - <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Invoice\View\Items" locator="//div[./div[@id='invoice_item_container']]" strategy="xpath"/> + <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Invoice\View\Items" locator="//section[./div[@id='invoice_item_container']]" strategy="xpath"/> </page> </config> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesInvoiceView.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesInvoiceView.xml index 7913b781d0ed9ab4910536ce0e1e5b42eed6de53..5f418de946c9ad9bf72ed79d56df610dc87124af 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesInvoiceView.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesInvoiceView.xml @@ -6,7 +6,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd"> - <page name="SalesInvoiceView" area="Adminhtml" mca="sales/invoice/view" module="Magento_Sales"> - <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Invoice\View\Items" locator=".grid" strategy="css selector"/> - </page> + <page name="SalesInvoiceView" area="Adminhtml" mca="sales/invoice/view" module="Magento_Sales"> + <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Invoice\View\Items" locator="#invoice_item_container" strategy="css selector" /> + </page> </config> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml index e0ac81201f8b3b611057687c771d69964ca835fd..e08828f7bff3bd1b96f52be17c1622a896cd61f1 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml @@ -210,7 +210,7 @@ <dataset name="virtual_big_qty"> <field name="entity_id" xsi:type="array"> - <item name="products" xsi:type="string">catalogProductSimple::virtual_big_qty</item> + <item name="products" xsi:type="string">catalogProductVirtual::virtual_big_qty</item> </field> <field name="customer_id" xsi:type="array"> <item name="dataSet" xsi:type="string">johndoe_unique</item> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml index c8328baab4af1305a8f77e86a412dc67fdc3f4ba..6371ae09b9981d48b42be0a1e9fd1c54897e91cd 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml @@ -29,7 +29,6 @@ <constraint name="Magento\Sales\Test\Constraint\AssertOrderInOrdersGridOnFrontend" /> </variation> <variation name="CreateOrderBackendTestVariation2"> - <data name="issue" xsi:type="string">Bug: MAGETWO-36210</data> <data name="description" xsi:type="string">Create order with virtual product for registered UK customer using Check/Money Order payment method</data> <data name="products" xsi:type="string">catalogProductVirtual::default</data> <data name="customer/dataSet" xsi:type="string">customer_UK</data> diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateCreditMemoStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateCreditMemoStep.php index fa43917e81db2e7454503c886f21e2dc7550ecdc..2a84ce0de1610cbce1aee00c6924de3e69d89f15 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateCreditMemoStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateCreditMemoStep.php @@ -101,6 +101,6 @@ class CreateCreditMemoStep implements TestStepInterface protected function getCreditMemoIds() { $this->salesOrderView->getOrderForm()->openTab('creditmemos'); - return $this->salesOrderView->getOrderForm()->getTabElement('creditmemos')->getGridBlock()->getIds(); + return $this->salesOrderView->getOrderForm()->getTab('creditmemos')->getGridBlock()->getIds(); } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateInvoiceStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateInvoiceStep.php index 304f58063a029496d5b50dfb06dab0cdb02a4d9b..e9a57dc4e4d68b963d472b82a640e65a8d45d314 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateInvoiceStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateInvoiceStep.php @@ -130,7 +130,7 @@ class CreateInvoiceStep implements TestStepInterface protected function getInvoiceIds() { $this->salesOrderView->getOrderForm()->openTab('invoices'); - return $this->salesOrderView->getOrderForm()->getTabElement('invoices')->getGridBlock()->getIds(); + return $this->salesOrderView->getOrderForm()->getTab('invoices')->getGridBlock()->getIds(); } /** @@ -141,6 +141,6 @@ class CreateInvoiceStep implements TestStepInterface protected function getShipmentIds() { $this->salesOrderView->getOrderForm()->openTab('shipments'); - return $this->salesOrderView->getOrderForm()->getTabElement('shipments')->getGridBlock()->getIds(); + return $this->salesOrderView->getOrderForm()->getTab('shipments')->getGridBlock()->getIds(); } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php index 1ea259d0e05cd8bab3aa9ffdbb4130114a86562d..ece5d725555b0b5b27b3317e043e76cdb8be2dab 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php @@ -111,6 +111,6 @@ class CreateShipmentStep implements TestStepInterface public function getShipmentIds() { $this->salesOrderView->getOrderForm()->openTab('shipments'); - return $this->salesOrderView->getOrderForm()->getTabElement('shipments')->getGridBlock()->getIds(); + return $this->salesOrderView->getOrderForm()->getTab('shipments')->getGridBlock()->getIds(); } } diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml index 897aa57c1bf7ff47a3b61b9d51e4b8782966a8ee..9c1a431440b6ce4fb5ffa23cca6549eb148f5d43 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml @@ -156,7 +156,7 @@ </dataset> <dataset name="active_sales_rule_for_all_groups_no_coupon"> - <field name="name" xsi:type="string">Shopping Cart Price Rule with Specific Coupon %isolation%</field> + <field name="name" xsi:type="string">Shopping Cart Price Rule without Coupon %isolation%</field> <field name="description" xsi:type="string">Description for Cart Price Rule</field> <field name="is_active" xsi:type="string">Active</field> <field name="website_ids" xsi:type="array"> diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php index e82c3e9bcc2c216a1185d1cb3c77f0ac9d5d6124..1a40513ce1e2bde70addfca84f6e7727dcf33bec 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php @@ -33,7 +33,6 @@ class CreateSalesRuleEntityTest extends Injectable /* tags */ const MVP = 'yes'; const DOMAIN = 'CS'; - const TO_MAINTAIN = 'yes'; /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php index 93e0e862805255e0f86bb8ccd131382acc2c280f..84c524d9cec06ab4163a7f1e37ca4ba14248b44d 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php @@ -32,7 +32,6 @@ class UpdateSalesRuleEntityTest extends Injectable /* tags */ const MVP = 'yes'; const DOMAIN = 'CS'; - const TO_MAINTAIN = 'yes'; /* end tags */ /** diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/ApplySalesRuleOnBackendStep.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/ApplySalesRuleOnBackendStep.php index 709e2c1644b71675224dc3941c2e4d7a1bc3ff7e..726dc678ee3ab3a439768728031914d14f649221 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/ApplySalesRuleOnBackendStep.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/ApplySalesRuleOnBackendStep.php @@ -41,7 +41,7 @@ class ApplySalesRuleOnBackendStep implements TestStepInterface } /** - * Apply gift card before one page checkout. + * Apply gift card on place order in admin. * * @return void */ diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/testcase.xml index ee5c69ad94715ea590bd880b56e73c54d815872e..88c81a0fb0274a8c8ad4597f410fe6a59cdc0f33 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/testcase.xml @@ -19,7 +19,7 @@ <step name="applySalesRuleOnBackend" module="Magento_SalesRule" next="fillBillingAddress"/> </scenario> <scenario name="CreateOrderFromCustomerPageTest"> - <step name="createSalesRule" module="Magento_SalesRule" next="openCustomerOnBackend"/> + <step name="createSalesRule" module="Magento_SalesRule" next="applySalesRuleOnBackend"/> <step name="applySalesRuleOnBackend" module="Magento_SalesRule" next="fillBillingAddress"/> </scenario> <scenario name="PrintOrderFrontendGuestTest"> diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php index 494496509b9aa9c0649fbe43335c4d232f50cf22..6095bc307182e299efb7e084a83abadfa7e79732 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php @@ -44,7 +44,7 @@ class AssertShipmentInShipmentsTab extends AbstractConstraint 'qty_to' => $totalQty[$key], ]; \PHPUnit_Framework_Assert::assertTrue( - $salesOrderView->getOrderForm()->getTabElement('shipments')->getGridBlock()->isRowVisible($filter), + $salesOrderView->getOrderForm()->getTab('shipments')->getGridBlock()->isRowVisible($filter), 'Shipment is absent on shipments tab.' ); } diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/Page/Adminhtml/SalesShipmentView.xml b/dev/tests/functional/tests/app/Magento/Shipping/Test/Page/Adminhtml/SalesShipmentView.xml index 61425421392f9fe6b5ea26a9a30b9a42252d35cf..9ea9fe428223a62e377ee3efbded8708930721b1 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/Page/Adminhtml/SalesShipmentView.xml +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/Page/Adminhtml/SalesShipmentView.xml @@ -8,6 +8,6 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd"> <page name="SalesShipmentView" area="Adminhtml" mca="sales/shipment/view" module="Magento_Shipping"> <block name="titleBlock" class="Magento\Theme\Test\Block\Html\Title" locator=".page-title-wrapper" strategy="css selector"/> - <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Shipment\View\Items" locator=".grid" strategy="css selector"/> + <block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Shipment\View\Items" locator="//section[div/table[contains(@class, 'order-shipment-table')]]" strategy="xpath"/> </page> </config> diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml index 46afe8448d32a61bb898160677f2cdef9de8954a..ae3c83014c7f0169da523f9e15c065671c69f167 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml @@ -24,6 +24,7 @@ <data name="prices" xsi:type="array"> <item name="grandTotal" xsi:type="string">17</item> </data> + <data name="tag" xsi:type="string">test_type:3rd_party_test</data> <constraint name="Magento\Checkout\Test\Constraint\AssertEstimateShippingAndTax" /> <constraint name="Magento\Customer\Test\Constraint\AssertCustomerForm" /> <constraint name="Magento\Sales\Test\Constraint\AssertOrderGrandTotal" /> diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php index 786403928d6568968dff2fa884e5c57f8b984f73..f4bdb4bb6f62e19d7b79dd810cf5a9571cc0db47 100644 --- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php +++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php @@ -54,6 +54,24 @@ class DataGrid extends Grid } } + /** + * Wait filter to load on page. + * + * @return void + */ + protected function waitFilterToLoad() + { + $this->getTemplateBlock()->waitForElementNotVisible($this->loader); + $browser = $this->_rootElement; + $selector = $this->filterButton . ', ' . $this->resetButton; + $browser->waitUntil( + function () use ($browser, $selector) { + $filter = $browser->find($selector); + return $filter->isVisible() == true ? true : null; + } + ); + } + /** * Open "Filter" block. * @@ -61,7 +79,7 @@ class DataGrid extends Grid */ protected function openFilterBlock() { - $this->getTemplateBlock()->waitForElementNotVisible($this->loader); + $this->waitFilterToLoad(); $toggleFilterButton = $this->_rootElement->find($this->filterButton); $searchButton = $this->_rootElement->find($this->searchButton); @@ -87,4 +105,21 @@ class DataGrid extends Grid $this->openFilterBlock(); parent::search($filter); } + + /** + * Search item and open it. + * + * @param array $filter + * @throws \Exception + */ + public function searchAndOpen(array $filter) + { + $rowItem = $this->getRow($filter); + if ($rowItem->isVisible()) { + $rowItem->find($this->editLink)->click(); + $this->waitForElement(); + } else { + throw new \Exception('Searched item was not found.'); + } + } } diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Cart/CartItem/Fpt.php b/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Cart/CartItem/Fpt.php index da370aa92d9d01595c844175ba63c607861e6854..53fbeac9a7a80c20b5607712cdaa47324dea6eb8 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Cart/CartItem/Fpt.php +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Cart/CartItem/Fpt.php @@ -19,7 +19,7 @@ class Fpt extends Block * * @var string */ - protected $price = './*[@class="price-excluding-tax"]/span'; + protected $price = './/*[@class="price"]'; /** * Selector for fpt diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php index db52e68e51d0dca4b902884aa5b6c9f1ff67e427..e4e4d4d8290757975c6ae25bb4131d8de38792dc 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php @@ -50,6 +50,13 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid */ protected $configureLink = 'a[onclick*="configureItem"]'; + /** + * Secondary part of row locator template for getRow() method with strict option. + * + * @var string + */ + protected $rowTemplateStrict = 'td[contains(.,normalize-space("%s"))]'; + /** * Delete product * @@ -96,7 +103,6 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid protected function getRow(array $filter, $isSearchable = true, $isStrict = true) { $options = []; - $this->openFilterBlock(); if (isset($filter['options'])) { $options = $filter['options']; unset($filter['options']); @@ -105,7 +111,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid $this->search($filter); } $location = '//tr['; - $rowTemplate = 'td[contains(.,normalize-space("%s"))]'; + $rowTemplate = ($isStrict) ? $this->rowTemplateStrict : $this->rowTemplate; $rows = []; foreach ($filter as $value) { $rows[] = sprintf($rowTemplate, $value); diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php index e0e346f9ccb5cdb01fb2ab788c016033adbaf96d..80ead47f4e3d3a60813d59163f5688382f746d67 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php @@ -29,7 +29,7 @@ class AssertProductInCustomerWishlistOnBackendGrid extends AbstractConstraint $filter = $this->prepareFilter($product); /** @var Grid $wishlistGrid */ - $wishlistGrid = $customerIndexEdit->getCustomerForm()->getTabElement('wishlist')->getSearchGridBlock(); + $wishlistGrid = $customerIndexEdit->getCustomerForm()->getTab('wishlist')->getSearchGridBlock(); \PHPUnit_Framework_Assert::assertTrue( $wishlistGrid->isRowVisible($filter, true, false), 'Product ' . $product->getName() . ' is absent in grid with configure option.' diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php index 24ecde4e0a7795204f195727f65b38938bded0b5..615b571ccb378401aa353a2b7c6bbb13b20385e7 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInCustomerBackendWishlist.php @@ -38,7 +38,7 @@ class AssertProductIsPresentInCustomerBackendWishlist extends AbstractConstraint $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]); $customerIndexEdit->getCustomerForm()->openTab('wishlist'); /** @var \Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist\Grid $wishlistGrid */ - $wishlistGrid = $customerIndexEdit->getCustomerForm()->getTabElement('wishlist')->getSearchGridBlock(); + $wishlistGrid = $customerIndexEdit->getCustomerForm()->getTab('wishlist')->getSearchGridBlock(); \PHPUnit_Framework_Assert::assertTrue( $wishlistGrid->isRowVisible(['product_name' => $product->getName()], true, false), diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php index b358e5c1344026b539c9ce5b17766f1f21f4edc2..ad5f58d16fe4d0300308017c80502dbf25a3063d 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php @@ -73,7 +73,7 @@ class ConfigureProductInCustomerWishlistOnBackendTest extends AbstractWishlistTe $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]); $customerForm = $customerIndexEdit->getCustomerForm(); $customerForm->openTab('wishlist'); - $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndAction( + $customerForm->getTab('wishlist')->getSearchGridBlock()->searchAndAction( ['product_name' => $product->getName()], 'Configure' ); diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php index cd22f6cbc2e7fee7f2635a4699dcf9db3c9fc387..f8673a5334d74cea99b32b815120b4141b11ae0b 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php @@ -77,7 +77,7 @@ class DeleteProductFromCustomerWishlistOnBackendTest extends AbstractWishlistTes $customerForm = $customerIndexEdit->getCustomerForm(); $customerForm->openTab('wishlist'); $filter = ['product_name' => $product->getName()]; - $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndAction($filter, 'Delete'); + $customerForm->getTab('wishlist')->getSearchGridBlock()->searchAndAction($filter, 'Delete'); return ['products' => [$product]]; } diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml index 459cdc51253790149f24b6e53429e16615462b2d..6bb0caf1abe69d0750606e57d266c83f1a26145f 100644 --- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml @@ -7,15 +7,14 @@ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> - <rule scope="testsuite"> - <allow> - <namespace value="Magento" /> - </allow> - </rule> <rule scope="testcase"> <deny> - <tag group="test_type" value="3rd_party_test" /> <tag group="test_type" value="3rd_party_test_deprecated" /> </deny> </rule> + <rule scope="variation"> + <deny> + <tag group="test_type" value="3rd_party_test" /> + </deny> + </rule> </config> diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml index 90bd37fa95380b044e21ef30e3c8d95a2e0b564b..6bfa264edebc62ad0704e1c053e0a9ee9f9e5f2d 100644 --- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml @@ -14,7 +14,6 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> - <tag group="test_type" value="3rd_party_test" /> <tag group="test_type" value="3rd_party_test_deprecated" /> </deny> </rule> @@ -22,6 +21,7 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> + <tag group="test_type" value="3rd_party_test" /> </deny> </rule> </config> diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml index 03730f6897cb858e124d2ee59bde9a32b44b1b6f..ae9b38f4d3194ed7880bbd2a66ee1ab8aedb86c3 100644 --- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml @@ -14,7 +14,6 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> - <tag group="test_type" value="3rd_party_test" /> <tag group="test_type" value="3rd_party_test_deprecated" /> </deny> </rule> @@ -22,6 +21,7 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> + <tag group="test_type" value="3rd_party_test" /> </deny> </rule> </config> diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml index 18054e3881d4d8768bf7b0307edd467930c31d48..f0072370676013bd0f4dd6634a812f5552f364b9 100644 --- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml @@ -14,7 +14,6 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> - <tag group="test_type" value="3rd_party_test" /> <tag group="test_type" value="3rd_party_test_deprecated" /> </deny> </rule> @@ -22,6 +21,7 @@ <deny> <tag group="stable" value="no" /> <tag group="to_maintain" value="yes" /> + <tag group="test_type" value="3rd_party_test" /> </deny> </rule> </config>