Skip to content

Commit c2e8709

Browse files
Manjunath ksManjunath ks
authored andcommitted
Code changes as per latest comments
1 parent 0a054e7 commit c2e8709

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

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

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,98 +20,86 @@
2020

2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
23-
24-
<!--Create a new additional store view for the deafult website and store-->
23+
<!--Create a new additional store view for the default website and store-->
2524
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createNewSecondStoreviewForDefaultStore">
2625
<argument name="storeView" value="SecondStoreGroupUnique"/>
2726
</actionGroup>
28-
<!--Create a new second store for the deafult website-->
27+
<!--Create a new second store for the default website-->
2928
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStoreForMainWebsite">
3029
<argument name="website" value="{{_defaultWebsite.name}}"/>
3130
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
3231
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
3332
</actionGroup>
34-
<!--Create a storeview for the second store-->
33+
<!--Create a store view for the second store-->
3534
<actionGroup ref="CreateCustomStoreViewActionGroup" stepKey="createStoreviewForSecondStore"/>
36-
35+
<!--Create a second custom website-->
3736
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createNewWebsite">
3837
<argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/>
3938
<argument name="websiteCode" value="{{secondCustomWebsite.code}}"/>
4039
</actionGroup>
41-
40+
<!--Create a store for the second website-->
4241
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createStoreForNewWebsite">
4342
<argument name="website" value="{{secondCustomWebsite.name}}"/>
4443
<argument name="storeGroupName" value="{{NewStoreData.name}}"/>
4544
<argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
4645
</actionGroup>
47-
46+
<!--Create a store view of the new store of second website-->
4847
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
4948
<argument name="StoreGroup" value="NewStoreData"/>
5049
<argument name="customStore" value="staticSecondStore"/>
5150
</actionGroup>
5251
</before>
5352

54-
5553
<after>
56-
54+
<!--Delete the created category-->
5755
<actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory">
5856
<argument name="categoryEntity" value="SimpleSubCategory"/>
5957
</actionGroup>
60-
58+
<!--Set the main website as default-->
6159
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault">
6260
<argument name="websiteName" value="{{_defaultWebsite.name}}"/>
6361
</actionGroup>
64-
62+
<!--Delete the second created website-->
6563
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCreatedWebsite">
6664
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
6765
</actionGroup>
68-
66+
<!--Create a second store created for main website-->
6967
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCreatedCustomWebsiteStore">
7068
<argument name="storeGroupName" value="customStoreGroup.name"/>
7169
</actionGroup>
72-
70+
<!--Create a second store view created for main website-->
7371
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCreatedCustomStoreview">
7472
<argument name="customStore" value="SecondStoreGroupUnique"/>
7573
</actionGroup>
7674
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
7775
</after>
78-
79-
76+
<!--Create a category and check that in storefront -->
8077
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
81-
8278
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
8379
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory"/>
8480
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnStorefront" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
8581
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad"/>
86-
87-
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToSecondMainStoreview">
82+
<!--Switch to second store view and check that created category in storefront-->
83+
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToSecondMainStoreView">
8884
<argument name="storeView" value="SecondStoreGroupUnique"/>
8985
</actionGroup>
9086
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2"/>
91-
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStoreview" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
87+
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStoreView" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
9288
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad2"/>
93-
94-
89+
<!--Switch to second store and check that created category in storefront-->
9590
<actionGroup ref="StorefrontSwitchStoreActionGroup" stepKey="switchToSecondMainStore">
9691
<argument name="storeName" value="{{customStoreGroup.name}}"/>
9792
</actionGroup>
9893
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory3"/>
9994
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStore" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
10095
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad3"/>
101-
96+
<!--Switch to second website and check that created category in storefront-->
10297
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setNewWebsiteAsDefault">
10398
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
10499
</actionGroup>
105100
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage2"/>
106101
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory4"/>
107102
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondWebsite" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
108103
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad4"/>
109-
110104
</test>
111-
</tests>
112-
113-
114-
115-
116-
117-
105+
</tests>

0 commit comments

Comments
 (0)