Skip to content

Commit 4fb2147

Browse files
author
Oleksii Kolesnyk
committed
MTA-2723: Functional test maintenance. Part 2
1 parent b839e7b commit 4fb2147

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ public function resetFilter()
302302
{
303303
$this->waitLoader();
304304
$this->_rootElement->find($this->resetButton)->click();
305+
$this->waitForElementVisible($this->loader);
305306
$this->waitLoader();
306307
}
307308

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function fill(FixtureInterface $fixture, SimpleElement $element = null)
5151
$store = $fixture->getStoreId();
5252
$storeSwitcherBlock = $this->browser->find($this->storeSwitcherBlock);
5353
$storeSwitcherBlock->find($this->dropdownBlock, Locator::SELECTOR_CSS, 'liselectstore')->setValue($store);
54-
$element = $this->browser->find($this->confirmModal);
54+
$modalElement = $this->browser->find($this->confirmModal);
5555
/** @var \Magento\Ui\Test\Block\Adminhtml\Modal $modal */
56-
$modal = $this->blockFactory->create('Magento\Ui\Test\Block\Adminhtml\Modal', ['element' => $element]);
56+
$modal = $this->blockFactory->create('Magento\Ui\Test\Block\Adminhtml\Modal', ['element' => $modalElement]);
5757
$modal->acceptAlert();
5858
}
5959

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class CustomOptions extends Form
3030
*
3131
* @var string
3232
*/
33-
protected $optionElement = '#product-options-wrapper .field';
33+
protected $optionElement = '#product-options-wrapper > * > .field';
3434

3535
/**
3636
* Selector for title of option
3737
*
3838
* @var string
3939
*/
40-
protected $title = 'label';
40+
protected $title = 'label > span:nth-child(1), legend > span:nth-child(1)';
4141

4242
/**
4343
* Selector for required option
@@ -381,7 +381,7 @@ protected function getOptionNotice(SimpleElement $option, $number)
381381
*/
382382
protected function parseOptionText($optionText)
383383
{
384-
preg_match('`^(.*?)\+\$(\d.*?)$`', $optionText, $match);
384+
preg_match('`^(.*?) \+ ?\$([\d\.,]*?)$`', $optionText, $match);
385385
$optionPrice = isset($match[2]) ? str_replace(',', '', $match[2]) : 0;
386386
$optionTitle = isset($match[1]) ? trim($match[1]) : $optionText;
387387

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddCompareProductsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<constraint name="Magento\Catalog\Test\Constraint\AssertProductComparePage" />
2222
</variation>
2323
<variation name="AddCompareProductsTestVariation3">
24-
<data name="products" xsi:type="string">configurableProduct::default</data>
24+
<data name="products" xsi:type="string">configurableProduct::configurable_with_qty_1</data>
2525
<data name="isCustomerLoggedIn" xsi:type="string">Yes</data>
2626
<constraint name="Magento\Catalog\Test\Constraint\AssertProductCompareItemsLink" />
2727
<constraint name="Magento\Catalog\Test\Constraint\AssertProductComparePage" />

dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ public function itemPriceProductBlock($index)
8181
*/
8282
public function getOptions(FixtureInterface $product)
8383
{
84-
$groupedOptions = $this->getGroupedProductBlock()->getOptions($product);
85-
return ['grouped_options' => $groupedOptions] + parent::getOptions($product);
84+
return ['grouped_options' => $this->getGroupedProductBlock()->getOptions($product)];
8685
}
8786

8887
/**

0 commit comments

Comments
 (0)