-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [Magento Community Engineering] Community Contributions - 2.4-devel…
…op expedited Accepted Community Pull Requests: - #23570: Improve: [UrlRewrite] Move grid implementation to ui components (by @Den4ik)
- Loading branch information
Showing
61 changed files
with
2,077 additions
and
341 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAddProductToCategoryActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminAddProductToCategoryActionGroup"> | ||
<annotations> | ||
<description>Add Product to Category</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="product"/> | ||
</arguments> | ||
|
||
<scrollTo selector="{{AdminCategoryBasicFieldSection.productsInCategory}}" x="0" y="-80" stepKey="scrollToProductInCategory"/> | ||
<click selector="{{AdminCategoryBasicFieldSection.productsInCategory}}" stepKey="clickOnProductInCategory"/> | ||
<fillField selector="{{AdminCategoryContentSection.productTableColumnName}}" userInput="{{product.name}}" stepKey="selectProduct"/> | ||
<click selector="{{AdminCategoryContentSection.productSearch}}" stepKey="clickSearchButton"/> | ||
<click selector="{{AdminCategoryContentSection.productTableRow}}" stepKey="selectProductFromTableRow"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCreateCategoryWithNoAnchorFieldTest"> | ||
<annotations> | ||
<stories value="Create categories"/> | ||
<title value="Create no anchor subcategory with all fields"/> | ||
<description value="Login as admin and create no anchor subcategory with all fields"/> | ||
<testCaseId value=""/> | ||
<severity value="CRITICAL"/> | ||
<group value="Catalog"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> | ||
<createData entity="_defaultBlock" stepKey="createDefaultCMSBlock"/> | ||
<createData entity="defaultSimpleProduct" stepKey="simpleProduct" /> | ||
</before> | ||
<after> | ||
<actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
<deleteData createDataKey="createDefaultCMSBlock" stepKey="deleteDefaultCMSBlock"/> | ||
<deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct"/> | ||
</after> | ||
|
||
<!--Create SubCategory--> | ||
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> | ||
<waitForPageLoad stepKey="waitForPageToLoaded"/> | ||
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/> | ||
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="fillCategoryName"/> | ||
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/> | ||
|
||
<!--Select Content and fill the options--> | ||
<scrollTo selector="{{AdminCategoryContentSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToContent"/> | ||
<click selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="selectContent"/> | ||
<scrollTo selector="{{AdminCategoryContentSection.AddCMSBlock}}" x="0" y="-80" stepKey="scrollToAddCMSBlock"/> | ||
<selectOption selector="{{AdminCategoryContentSection.AddCMSBlock}}" userInput="$$createDefaultCMSBlock.title$$" stepKey="selectCMSBlock"/> | ||
|
||
<!--Select Display Setting and fill the options--> | ||
<scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" stepKey="scrollToDisplaySetting"/> | ||
<click selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" stepKey="selectDisplaySetting"/> | ||
<selectOption selector="{{CategoryDisplaySettingsSection.displayMode}}" userInput="PRODUCTS_AND_PAGE" stepKey="selectdisplayMode"/> | ||
<click selector="{{CategoryDisplaySettingsSection.anchorLabel}}" stepKey="uncheckAnchor"/> | ||
<click selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="enableTheAvailableProductList"/> | ||
<selectOption selector="{{CategoryDisplaySettingsSection.productList}}" parameterArray="['Position', 'Product Name', 'Price']" stepKey="selectPrice"/> | ||
<scrollTo selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" x="0" y="-80" stepKey="scrollToDefaultProductList"/> | ||
<click selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="enableTheDefaultProductList"/> | ||
<selectOption selector="{{CategoryDisplaySettingsSection.defaultProductList}}" userInput="name" stepKey="selectProductName"/> | ||
<scrollTo selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" x="0" y="-80" stepKey="scrollToLayeredNavPrice"/> | ||
<click selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" stepKey="enableLayeredNavigationPrice"/> | ||
<fillField selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceInput}}" userInput="5.5" stepKey="fillThePrice"/> | ||
|
||
<!--Search the products and select the category products--> | ||
<actionGroup ref="AdminAddProductToCategoryActionGroup" stepKey="addProductToCategory"> | ||
<argument name="product" value="$$simpleProduct$$"/> | ||
</actionGroup> | ||
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickSaveButton"/> | ||
<waitForPageLoad stepKey="waitForCategorySaved"/> | ||
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the category." stepKey="assertSuccessMessage"/> | ||
<waitForPageLoad stepKey="waitForPageTitleToBeSaved"/> | ||
|
||
<!-- Get Category ID --> | ||
<actionGroup ref="OpenCategoryFromCategoryTreeActionGroup" stepKey="getCategoryId"> | ||
<argument name="category" value="{{_defaultCategory.name}}"/> | ||
</actionGroup> | ||
<grabFromCurrentUrl stepKey="categoryId" regex="#\/([0-9]*)?\/$#"/> | ||
|
||
<!--Verify the Category Title--> | ||
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" /> | ||
|
||
<!--Verify Url Rewrite--> | ||
<actionGroup ref="AdminSearchByRequestPathActionGroup" stepKey="searchByRequestPath"> | ||
<argument name="redirectPath" value="{{_defaultCategory.name_lwr}}.html"/> | ||
<argument name="redirectType" value="No"/> | ||
<argument name="targetPath" value="catalog/category/view/id/{$categoryId}"/> | ||
</actionGroup> | ||
|
||
<!--Verify Product in store front page--> | ||
<amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name_lwr)}}" stepKey="amOnCategoryPage"/> | ||
<waitForPageLoad stepKey="waitForPageToBeLoaded"/> | ||
<see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryPageTitle"/> | ||
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="seeCategoryOnNavigation"/> | ||
<waitForPageLoad stepKey="waitForProductToLoad"/> | ||
<seeElement selector="{{StorefrontCategoryMainSection.productLinkByHref($$simpleProduct.urlKey$$)}}" stepKey="seeProductInCategory"/> | ||
<dontSeeElement selector="{{StorefrontCategorySidebarSection.filterOptions}}" stepKey="dontSeeFilterOptionsForNonAnchorCategory"/> | ||
</test> | ||
</tests> |
46 changes: 46 additions & 0 deletions
46
...ode/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductNotVisibleIndividuallyTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCreateSimpleProductNotVisibleIndividuallyTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Create a Simple Product via Admin"/> | ||
<title value="Create Simple Product that Not Visible Individually"/> | ||
<description value="Create Simple Product that Not Visible Individually"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value=""/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> | ||
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/> | ||
</before> | ||
<after> | ||
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> | ||
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> | ||
</after> | ||
|
||
<!--Create Simple Product Not Visible Individually--> | ||
<actionGroup ref="FillAdminSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin"> | ||
<argument name="category" value="$$createPreReqCategory$$"/> | ||
<argument name="simpleProduct" value="simpleProductNotVisibleIndividually"/> | ||
</actionGroup> | ||
|
||
<!--Search and verify AssertUrlRewriteNotInGrid--> | ||
<actionGroup ref="AdminSearchDeletedUrlRewriteActionGroup" stepKey="searchUrlRewriteForNotVisibleProductInGrid"> | ||
<argument name="requestPath" value="{{simpleProductNotVisibleIndividually.urlKey}}.html"/> | ||
</actionGroup> | ||
|
||
<!--Verify AssertPageByUrlRewriteIsNotFound--> | ||
<actionGroup ref="AssertPageByUrlRewriteIsNotFoundActionGroup" stepKey="amOnPage"> | ||
<argument name="requestPath" value="{{simpleProductNotVisibleIndividually.urlKey}}.html"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.