Skip to content

Commit 5a6e82b

Browse files
committed
Replace some actions with ActionGroups in the test
1 parent b145391 commit 5a6e82b

File tree

2 files changed

+43
-11
lines changed

2 files changed

+43
-11
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontBreadcrubmsAreShownActionGroup">
12+
<arguments>
13+
<argument name="breadcrumbs" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="{{breadcrumbs}}" stepKey="seeBreadcrumbsOnPage"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,36 @@
6363
</actionGroup>
6464

6565
<!--Veriy the breadcrumbs on Product Display page-->
66-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs1"/>
67-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory"/>
68-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productOne.name$$" stepKey="seeCorrectBreadCrumbProduct"/>
66+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs1">
67+
<argument name="breadcrumbs" value="Home"/>
68+
</actionGroup>
69+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory">
70+
<argument name="breadcrumbs" value="$$createCategoryOne.name$$"/>
71+
</actionGroup>
72+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct">
73+
<argument name="breadcrumbs" value="$$productOne.name$$"/>
74+
</actionGroup>
6975

70-
<click selector="{{StorefrontNavigationSection.topCategory($$createCategoryOne.name$$)}}" stepKey="goBackToCategoryPage"/>
71-
<waitForPageLoad stepKey="waitforCategoryPageToLoad2"/>
76+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goBackToCategoryPage">
77+
<argument name="category" value="$createCategoryOne$"/>
78+
</actionGroup>
79+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitforCategoryPageToLoad2"/>
7280

7381
<!--Open product display page-->
74-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" stepKey="clickProductToGoSecondProductPage"/>
75-
<waitForPageLoad stepKey="waitForProductDisplayPageLoad3"/>
82+
<actionGroup ref="StorefrontOpenProductFromCategoryPageActionGroup" stepKey="clickProductToGoSecondProductPage">
83+
<argument name="productName" value="{{productWithHTMLEntityTwo.name}}"/>
84+
</actionGroup>
85+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductDisplayPageLoad3"/>
7686

7787
<!--Verify the breadcrumbs on Product Display page-->
78-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs2"/>
79-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory2"/>
80-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productTwo.name$$" stepKey="seeCorrectBreadCrumbProduct2"/>
81-
88+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs2">
89+
<argument name="breadcrumbs" value="Home"/>
90+
</actionGroup>
91+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory2">
92+
<argument name="breadcrumbs" value="$$createCategoryOne.name$$"/>
93+
</actionGroup>
94+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct2">
95+
<argument name="breadcrumbs" value="$$productTwo.name$$"/>
96+
</actionGroup>
8297
</test>
8398
</tests>

0 commit comments

Comments
 (0)