Skip to content

Commit 27ff825

Browse files
committed
MAGETWO-51472: [FT] Form page action block is covering fields on product page
- Added hover to context before category set;
1 parent d087322 commit 27ff825

File tree

2 files changed

+6
-27
lines changed
  • dev/tests/functional

2 files changed

+6
-27
lines changed

dev/tests/functional/lib/Magento/Mtf/Client/Element/SuggestElement.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Magento\Mtf\Client\Element;
88

9-
use Magento\Mtf\Client\ElementInterface;
109
use Magento\Mtf\Client\Locator;
1110

1211
/**
@@ -81,7 +80,7 @@ public function setValue($value)
8180
$searchedItem = $this->find(sprintf($this->resultItem, $value), Locator::SELECTOR_XPATH);
8281
if ($searchedItem->isVisible()) {
8382
try {
84-
$this->clickOnSearchedItem($searchedItem);
83+
$searchedItem->click();
8584
break;
8685
} catch (\Exception $e) {
8786
// In parallel run on windows change the focus is lost on element
@@ -95,17 +94,6 @@ public function setValue($value)
9594
}
9695
}
9796

98-
/**
99-
* Click on searched item.
100-
*
101-
* @param ElementInterface $searchedItem
102-
* @return void
103-
*/
104-
protected function clickOnSearchedItem(ElementInterface $searchedItem)
105-
{
106-
$searchedItem->click();
107-
}
108-
10997
/**
11098
* Send keys.
11199
*

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails/CategoryIds.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Section\ProductDetails;
88

99
use Magento\Mtf\Client\Element\MultisuggestElement;
10-
use Magento\Mtf\Client\ElementInterface;
1110

1211
/**
1312
* Typified element class for category element.
@@ -22,22 +21,14 @@ class CategoryIds extends MultisuggestElement
2221
protected $resultItem = './/label[contains(@class, "admin__action-multiselect-label")]/span[text() = "%s"]';
2322

2423
/**
25-
* Locator for new category button.
24+
* Set value.
2625
*
27-
* @var string
28-
*/
29-
protected $newCategory = '[data-index="create_category_button"]';
30-
31-
/**
32-
* Click on searched category item.
33-
*
34-
* @param ElementInterface $searchedItem
26+
* @param array|string $values
3527
* @return void
3628
*/
37-
protected function clickOnSearchedItem(ElementInterface $searchedItem)
29+
public function setValue($values)
3830
{
39-
$searchedItem->hover();
40-
$this->getContext()->find($this->newCategory)->hover();
41-
parent::clickOnSearchedItem($searchedItem);
31+
$this->getContext()->hover();
32+
parent::setValue($values);
4233
}
4334
}

0 commit comments

Comments
 (0)