Skip to content

Commit 4656654

Browse files
committed
MAGETWO-54456: Random FAT test fails CatalogRuleStaging_Create_ForNewCustomerGroup_ApplyAsPercentage
1 parent a44c2a2 commit 4656654

File tree

1 file changed

+19
-0
lines changed
  • dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit

1 file changed

+19
-0
lines changed

dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
*/
1616
class PromoForm extends FormSections
1717
{
18+
/**
19+
* Magento form loader.
20+
*
21+
* @var string
22+
*/
23+
protected $spinner = '[data-role="spinner"]';
24+
1825
/**
1926
* Fill form with tabs.
2027
*
@@ -25,6 +32,7 @@ class PromoForm extends FormSections
2532
*/
2633
public function fill(FixtureInterface $fixture, SimpleElement $element = null, array $replace = null)
2734
{
35+
$this->waitPageToLoad();
2836
$sections = $this->getFixtureFieldsByContainers($fixture);
2937
if ($replace) {
3038
$sections = $this->prepareData($sections, $replace);
@@ -55,4 +63,15 @@ protected function prepareData(array $tabs, array $replace)
5563

5664
return $tabs;
5765
}
66+
67+
/**
68+
* Wait page to load.
69+
*
70+
* @return void
71+
*/
72+
protected function waitPageToLoad()
73+
{
74+
$this->waitForElementVisible($this->header);
75+
$this->waitForElementNotVisible($this->spinner);
76+
}
5877
}

0 commit comments

Comments
 (0)