Skip to content

Commit d3fb9b5

Browse files
committed
MAGETWO-86335: [2.2] Product belongs to categories with and without event does not shown
1 parent 9f2fbdb commit d3fb9b5

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCategoryActionGroup.xml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,15 @@
3434
<seeElement selector="{{StorefrontCategoryProductSection.productTitleByName(product.name)}}" stepKey="assertProductName"/>
3535
<see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/>
3636
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
37-
<executeInSelenium function="function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) use($I) {
38-
$selProdName = '//main//li[.//a[contains(text(), \'' . {{product.name}} . '\' )]]//div[@data-container=\'product-grid\']';
39-
$I->assertEquals('2', $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath($selProdName))->getCSSValue('z-index'));
37+
<executeInSelenium function="function($webdriver) use ($I) {
38+
$productName = '//main//li[.//a[contains(text(), \'' . {{product.name}} . '\' )]]//div[@data-container=\'product-grid\']';
39+
$I->assertEquals('2', $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath($productName))->getCSSValue('z-index'));
4040
}" stepKey="assertProductContainerIsOpened"/>
4141
<seeElement selector="{{StorefrontCategoryProductSection.productAddToCartByName(product.name)}}" stepKey="AssertAddToCart" />
4242
</actionGroup>
4343

44-
<actionGroup name="StorefrontCheckAddToCartButtonAbsence">
45-
<arguments>
46-
<argument name="product" defaultValue="_defaultProduct"/>
47-
</arguments>
48-
<seeElement selector="{{StorefrontCategoryProductSection.productTitleByName(product.name)}}" stepKey="assertProductName"/>
49-
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
50-
<executeInSelenium function="function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) use($I) {
51-
$selProdName = '//main//li[.//a[contains(text(), \'' . {{product.name}} . '\' )]]//div[@data-container=\'product-grid\']';
52-
$I->assertEquals('2', $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath($selProdName))->getCSSValue('z-index'));
53-
}" stepKey="assertProductContainerIsOpened"/>
54-
<dontSeeElement selector="{{StorefrontCategoryProductSection.productAddToCartByName(product.name)}}" stepKey="checkAddToCartButtonAbsence"/>
44+
<actionGroup name="StorefrontCheckAddToCartButtonAbsence" extends="StorefrontCheckCategorySimpleProduct">
45+
<dontSeeElement selector="{{StorefrontCategoryProductSection.productAddToCartByName(product.name)}}" stepKey="AssertAddToCart"/>
5546
</actionGroup>
5647

5748
<actionGroup name="StorefrontSwitchCategoryViewToListMode">

0 commit comments

Comments
 (0)