Skip to content

Commit 67392f6

Browse files
shashikant.kumarshashikant.kumar
authored andcommitted
Xpath Modification
1 parent c14b15a commit 67392f6

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
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+
<argument name="RootCat" type="string" defaultValue="Default Category"/>
19+
<argument name="FirstSubCat" type="string"/>
20+
<argument name="SecondSubCat" type="string"/>
21+
<argument name="ThirdSubCat" type="string"/>
22+
<argument name="FourthSubCat" type="string"/>
23+
<argument name="FifthSubCat" type="string"/>
1824
</arguments>
1925
<amOnPage url="{{CmsNewWidgetsPage.url}}" stepKey="navigateToCreateWidgetsPage"/>
2026
<waitForPageLoad stepKey="waitForWidgetPageToLoad"/>
@@ -32,17 +38,17 @@
3238
<selectOption selector="{{CmsNewWidgetUpdateLayoutSection.SpecificCategories}}" userInput="Specific Categories" stepKey="selectSpecificCategoryRadioButton"/>
3339
<click selector="{{CmsNewWidgetUpdateLayoutSection.CategoryChooserButton}}" stepKey="clickCategoryChooserButton"/>
3440
<waitForPageLoad stepKey="waitForRootCategoryToLoad"/>
35-
<click selector="{{CmsNewWidgetUpdateLayoutSection.RootCat}}" stepKey="clickRootCat"/>
41+
<click selector="{{CmsNewWidgetUpdateLayoutSection.RootCat(RootCat)}}" stepKey="clickRootCat"/>
3642
<waitForPageLoad stepKey="waitForRootCategoryToExpand"/>
37-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FirstSubCat}}" stepKey="clickFirstSubCat"/>
43+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FirstSubCat(FirstSubCat)}}" stepKey="clickFirstSubCat"/>
3844
<waitForPageLoad stepKey="waitForFirstSubCatToExpand"/>
39-
<click selector="{{CmsNewWidgetUpdateLayoutSection.SecondSubCat}}" stepKey="expandSecondSubCat"/>
45+
<click selector="{{CmsNewWidgetUpdateLayoutSection.SecondSubCat(SecondSubCat)}}" stepKey="expandSecondSubCat"/>
4046
<waitForPageLoad stepKey="waitForSecondSubCatToExpand"/>
41-
<click selector="{{CmsNewWidgetUpdateLayoutSection.ThirdSubCat}}" stepKey="expandThirdFirstSubCat"/>
47+
<click selector="{{CmsNewWidgetUpdateLayoutSection.ThirdSubCat(ThirdSubCat)}}" stepKey="expandThirdFirstSubCat"/>
4248
<waitForPageLoad stepKey="waitForThirdSubCatToExpand"/>
43-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FourthSubCat}}" stepKey="expandFourthSubCat"/>
49+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FourthSubCat(FourthSubCat)}}" stepKey="expandFourthSubCat"/>
4450
<waitForPageLoad stepKey="waitForFourthSubCatToExpand"/>
45-
<click selector="{{CmsNewWidgetUpdateLayoutSection.FifthSubCat}}" stepKey="expandFifthSubCat"/>
51+
<click selector="{{CmsNewWidgetUpdateLayoutSection.FifthSubCat(FifthSubCat)}}" stepKey="expandFifthSubCat"/>
4652
<waitForPageLoad stepKey="waitForFifthSubCatToExpand"/>
4753
<grabMultiple selector="{{CmsNewWidgetUpdateLayoutSection.CountAllNestedCat}}" stepKey="countNestedCategory"/>
4854
<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)