Skip to content

Commit 03918df

Browse files
author
Dmytro Bursak
committed
MTA-2319: [PS] Backend module functional tests maintenance
- Corrected global search set value
1 parent 7d4c84c commit 03918df

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,12 @@ class GlobalsearchElement extends SimpleElement
6363
public function setValue($value)
6464
{
6565
$this->eventManager->dispatchEvent(['set_value'], [__METHOD__, $this->getAbsoluteSelector()]);
66-
6766
$this->waitInitElement();
68-
6967
if (!$this->find($this->searchInput)->isVisible()) {
7068
$this->find($this->searchIcon)->click();
7169
}
72-
// $this->selectWindow();
7370
$this->clear();
7471
$this->find($this->searchInput)->setValue($value);
75-
// $this->selectWindow();
76-
7772
$this->waitResult();
7873
}
7974

@@ -90,16 +85,6 @@ protected function clear()
9085
}
9186
}
9287

93-
/**
94-
* Select to last window.
95-
*
96-
* @return void
97-
*/
98-
protected function selectWindow()
99-
{
100-
$this->driver->selectWindow();
101-
}
102-
10388
/**
10489
* Wait init search suggest container.
10590
*
@@ -130,12 +115,7 @@ public function waitResult()
130115

131116
$this->driver->waitUntil(
132117
function () use ($browser, $selector) {
133-
if ($browser->find($selector)->isVisible()) {
134-
return true;
135-
} else {
136-
// $browser->selectWindow();
137-
return null;
138-
}
118+
return $browser->find($selector)->isVisible() ? true : null;
139119
}
140120
);
141121
}

0 commit comments

Comments
 (0)