File tree Expand file tree Collapse file tree 2 files changed +6
-27
lines changed
lib/Magento/Mtf/Client/Element
tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails Expand file tree Collapse file tree 2 files changed +6
-27
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Mtf \Client \Element ;
8
8
9
- use Magento \Mtf \Client \ElementInterface ;
10
9
use Magento \Mtf \Client \Locator ;
11
10
12
11
/**
@@ -81,7 +80,7 @@ public function setValue($value)
81
80
$ searchedItem = $ this ->find (sprintf ($ this ->resultItem , $ value ), Locator::SELECTOR_XPATH );
82
81
if ($ searchedItem ->isVisible ()) {
83
82
try {
84
- $ this -> clickOnSearchedItem ( $ searchedItem );
83
+ $ searchedItem -> click ( );
85
84
break ;
86
85
} catch (\Exception $ e ) {
87
86
// In parallel run on windows change the focus is lost on element
@@ -95,17 +94,6 @@ public function setValue($value)
95
94
}
96
95
}
97
96
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
-
109
97
/**
110
98
* Send keys.
111
99
*
Original file line number Diff line number Diff line change 7
7
namespace Magento \Catalog \Test \Block \Adminhtml \Product \Edit \Section \ProductDetails ;
8
8
9
9
use Magento \Mtf \Client \Element \MultisuggestElement ;
10
- use Magento \Mtf \Client \ElementInterface ;
11
10
12
11
/**
13
12
* Typified element class for category element.
@@ -22,22 +21,14 @@ class CategoryIds extends MultisuggestElement
22
21
protected $ resultItem = './/label[contains(@class, "admin__action-multiselect-label")]/span[text() = "%s"] ' ;
23
22
24
23
/**
25
- * Locator for new category button .
24
+ * Set value .
26
25
*
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
35
27
* @return void
36
28
*/
37
- protected function clickOnSearchedItem ( ElementInterface $ searchedItem )
29
+ public function setValue ( $ values )
38
30
{
39
- $ searchedItem ->hover ();
40
- $ this ->getContext ()->find ($ this ->newCategory )->hover ();
41
- parent ::clickOnSearchedItem ($ searchedItem );
31
+ $ this ->getContext ()->hover ();
32
+ parent ::setValue ($ values );
42
33
}
43
34
}
You can’t perform that action at this time.
0 commit comments