Skip to content

Commit 5b6a6a0

Browse files
shashikant.kumarshashikant.kumar
authored andcommitted
MC-40114 xpath modification
1 parent 60b3bf9 commit 5b6a6a0

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
<argument name="WidgetType" type="string" defaultValue="Catalog Product Link"/>
1616
<argument name="WidgetTheme" type="string" defaultValue="Magento Luma"/>
1717
<argument name="WidgetDisplayOn" type="string"/>
18+
19+
<argument name="RootCat" type="string" defaultValue="Default Category"/>
20+
<argument name="FirstSubCat" type="string"/>
21+
<argument name="SecondSubCat" type="string"/>
22+
<argument name="ThirdSubCat" type="string"/>
23+
<argument name="FourthSubCat" type="string"/>
24+
<argument name="FifthSubCat" type="string"/>
1825
</arguments>
1926
<amOnPage url="{{CmsNewWidgetsPage.url}}" stepKey="navigateToCreateWidgetsPage"/>
2027
<waitForPageLoad stepKey="waitForWidgetPageToLoad"/>
@@ -32,17 +39,17 @@
3239
<selectOption selector="{{CmsNewWidgetUpdateLayoutSection.SpecificCategories}}" userInput="Specific Categories" stepKey="selectSpecificCategoryRadioButton"/>
3340
<click selector="{{CmsNewWidgetUpdateLayoutSection.CategoryChooserButton}}" stepKey="clickCategoryChooserButton"/>
3441
<waitForPageLoad stepKey="waitForRootCategoryToLoad"/>
35-
<click selector="{{CmsNewWidgetUpdateLayoutSection.RootCat}}" stepKey="clickRootCat"/>
42+
<click selector="{{CmsNewWidgetUpdateLayoutSection.RootCat(RootCat)}}" stepKey="clickRootCat"/>
3643
<waitForPageLoad stepKey="waitForRootCategoryToExpand"/>
37-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FirstSubCat}}" stepKey="clickFirstSubCat"/>
44+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FirstSubCat(FirstSubCat)}}" stepKey="clickFirstSubCat"/>
3845
<waitForPageLoad stepKey="waitForFirstSubCatToExpand"/>
39-
<click selector="{{CmsNewWidgetUpdateLayoutSection.SecondSubCat}}" stepKey="expandSecondSubCat"/>
46+
<click selector="{{CmsNewWidgetUpdateLayoutSection.SecondSubCat(SecondSubCat)}}" stepKey="expandSecondSubCat"/>
4047
<waitForPageLoad stepKey="waitForSecondSubCatToExpand"/>
41-
<click selector="{{CmsNewWidgetUpdateLayoutSection.ThirdSubCat}}" stepKey="expandThirdFirstSubCat"/>
48+
<click selector="{{CmsNewWidgetUpdateLayoutSection.ThirdSubCat(ThirdSubCat)}}" stepKey="expandThirdFirstSubCat"/>
4249
<waitForPageLoad stepKey="waitForThirdSubCatToExpand"/>
43-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FourthSubCat}}" stepKey="expandFourthSubCat"/>
50+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FourthSubCat(FourthSubCat)}}" stepKey="expandFourthSubCat"/>
4451
<waitForPageLoad stepKey="waitForFourthSubCatToExpand"/>
45-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FifthSubCat}}" stepKey="expandFifthSubCat"/>
52+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FifthSubCat(FifthSubCat)}}" stepKey="expandFifthSubCat"/>
4653
<waitForPageLoad stepKey="waitForFifthSubCatToExpand"/>
4754
<grabMultiple selector="{{CmsNewWidgetUpdateLayoutSection.CountAllNestedCat}}" stepKey="countNestedCategory"/>
4855
<assertCount stepKey="check">

app/code/Magento/Catalog/Test/Mftf/Test/AdminValidateAllNestedCategoryInWidgetTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
<argument name="WidgetType" value="CMS Static Block"/>
5656
<argument name="WidgetTheme" value="Magento Luma"/>
5757
<argument name="WidgetDisplayOn" value="Anchor Categories"/>
58+
<argument name="RootCat" value="Default Category"/>
59+
<argument name="FirstSubCat" value="$createDefaultCategory.name$"/>
60+
<argument name="SecondSubCat" value="$createTwoLevelNestedCategories.name$"/>
61+
<argument name="ThirdSubCat" value="$createThreeLevelNestedCategories.name$"/>
62+
<argument name="FourthSubCat" value="$createFourLevelNestedCategories.name$"/>
63+
<argument name="FifthSubCat" value="$createFiveLevelNestedCategories.name$"/>
5864
</actionGroup>
5965
</test>
6066
</tests>

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/CmsNewWidgetUpdateLayoutSection.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<element name="Template" type="button" selector="#all_pages_0 > table > tbody > tr > td:nth-child(2) > div > div > select"/>
1515
<element name="SpecificCategories" type="button" selector="//input[@id='specific_anchor_categories_0']"/>
1616
<element name="CategoryChooserButton" type="button" selector="//*[@id='anchor_categories_ids_0']/p/a[1]/img"/>
17-
<element name="RootCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
18-
<element name="FirstSubCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
19-
<element name="SecondSubCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
20-
<element name="ThirdSubCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
21-
<element name="FourthSubCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
22-
<element name="FifthSubCat" type="button" selector="//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']"/>
17+
<element name="RootCat" type="button" selector="//a/span[contains(text(),'{{var}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
18+
<element name="FirstSubCat" type="button" selector="//a/span[contains(text(),'{{var1}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
19+
<element name="SecondSubCat" type="button" selector="//a/span[contains(text(),'{{var2}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
20+
<element name="ThirdSubCat" type="button" selector="//a/span[contains(text(),'{{var3}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
21+
<element name="FourthSubCat" type="button" selector="//a/span[contains(text(),'{{var4}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
22+
<element name="FifthSubCat" type="button" selector="//a/span[contains(text(),'{{var5}}')]/../..//img[@class='x-tree-ec-icon x-tree-elbow-end-plus']" parameterized="true"/>
2323
<element name="CountAllNestedCat" type="button" selector="//*[@class='x-tree-ec-icon x-tree-elbow-end-minus' or @class='x-tree-ec-icon x-tree-elbow-end']"/>
2424
</section>
2525
</sections>

0 commit comments

Comments
 (0)