Skip to content

Commit 72751d3

Browse files
committed
MTA-1594: Re-factor Functional tests which are not end-to-end
- CR Changes
1 parent bc90a57 commit 72751d3

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Action/Attribute.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
*/
1616
class Attribute extends Form
1717
{
18-
/**
19-
* CSS selector for 'save' button.
20-
*
21-
* @var string
22-
*/
23-
protected $saveButton = '[data-ui-id="page-actions-toolbar-save-button"]';
24-
2518
/**
2619
* Fill the root form.
2720
*
@@ -33,7 +26,7 @@ public function fill(FixtureInterface $fixture, SimpleElement $element = null)
3326
{
3427
$data = $fixture->getData();
3528
foreach ($data as $name => $dataValue) {
36-
$fields['toggle_' . $name ] = 'Yes';
29+
$fields['toggle_' . $name] = 'Yes';
3730
$fields[$name] = $dataValue;
3831
}
3932
$mapping = $this->dataMapping($fields);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\Catalog\Test\Block\Adminhtml\Product\Attribute;
7+
namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Action;
88

99
/**
1010
* Form action.

dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Adminhtml/CatalogProductActionAttributeEdit.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
9-
<page name="CatalogProductActionAttributeEdit" area="Product" mca="catalog/product_action_attribute/edit" module="Magento_Catalog">
9+
<page name="CatalogProductActionAttributeEdit" area="Adminhtml" mca="catalog/product_action_attribute/edit" module="Magento_Catalog">
1010
<block name="attributesBlockForm" class="Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Action\Attribute" locator="body" strategy="css selector" />
11-
<block name="formPageActions" class="Magento\Catalog\Test\Block\Adminhtml\Product\Attribute\FormPageActions" locator=".page-main-actions" strategy="css selector" />
11+
<block name="formPageActions" class="Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Action\FormPageActions" locator=".page-main-actions" strategy="css selector" />
1212
</page>
1313
</config>
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Mtf\TestCase\Injectable;
1010
use Magento\Catalog\Test\Fixture\CatalogProductSimple;
1111
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
12-
use Magento\Catalog\Test\Page\Product\CatalogProductActionAttributeEdit;
12+
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductActionAttributeEdit;
1313

1414
/**
1515
* Precondition:
@@ -22,7 +22,7 @@
2222
* 3. Find Product (from preconditions) in Products grid.
2323
* 4. Select Product's check-box.
2424
* 5. Select "Update Attributes" value in "Select Product Actions" drop-down list.
25-
* 6. Click on the "Submit" button. "Attributes" page is opened (/catalog/product_action_attribute/edit/).
25+
* 6. Click on the "Submit" button.
2626
* 7. Open "Attributes" tab.
2727
* 8. Fill data.
2828
* 9. Click on the "Save" button.
@@ -31,7 +31,7 @@
3131
* @group Products_(MX)
3232
* @ZephyrId MAGETWO-21128
3333
*/
34-
class MassProductPriceUpdateTest extends Injectable
34+
class MassProductUpdateTest extends Injectable
3535
{
3636
/* tags */
3737
const MVP = 'yes';
@@ -99,7 +99,6 @@ public function test(CatalogProductSimple $initialProduct, CatalogProductSimple
9999
$this->productGrid->getProductGrid()->updateAttributes([['sku' => $initialProduct->getSku()]]);
100100
$this->attributeMassActionPage->getAttributesBlockForm()->fill($product);
101101
$this->attributeMassActionPage->getFormPageActions()->save();
102-
$this->productGrid->getMessagesBlock()->waitSuccessMessage();
103102
$data = array_merge($initialProduct->getData(), $product->getData());
104103
$product = $this->objectManager->create(
105104
'Magento\Catalog\Test\Fixture\CatalogProductSimple',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd">
9-
<testCase name="Magento\Catalog\Test\TestCase\Product\MassProductPriceUpdateTest">
9+
<testCase name="Magento\Catalog\Test\TestCase\Product\MassProductUpdateTest">
1010
<variation name="MassProductPriceUpdateTestVariation1">
1111
<data name="configData" xsi:type="string">product_flat</data>
1212
<data name="initialProduct/dataSet" xsi:type="string">simple_10_dollar</data>

0 commit comments

Comments
 (0)