-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3885 from magento-pangolin/mtf-eol-pr
[pangolins] Convert MTF tests to MFTF tests - closes magento-commerce/magento-functional-tests-migration#417 - closes magento-commerce/magento-functional-tests-migration#632
- Loading branch information
Showing
86 changed files
with
2,351 additions
and
19 deletions.
There are no files selected for viewing
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
22 changes: 22 additions & 0 deletions
22
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductInfoOnEditPageActionGroup.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,22 @@ | ||
<?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="AssertProductInfoOnEditPageActionGroup" extends="OpenEditProductOnBackendActionGroup"> | ||
<arguments> | ||
<argument name="product" type="entity"/> | ||
</arguments> | ||
<waitForPageLoad stepKey="waitForProductToLoad"/> | ||
<seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{product.name}}" stepKey="seeProductName"/> | ||
<seeInField selector="{{AdminProductFormSection.productSku}}" userInput="{{product.sku}}" stepKey="seeProductSku"/> | ||
<seeInField selector="{{AdminProductFormSection.productPrice}}" userInput="{{product.price}}" stepKey="seeProductPrice"/> | ||
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{product.quantity}}" stepKey="seeProductQuantity"/> | ||
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{product.status}}" stepKey="seeProductStockStatus"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertProductOnAdminGridActionGroup.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,17 @@ | ||
<?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="AssertProductOnAdminGridActionGroup" extends="viewProductInAdminGrid"> | ||
<arguments> | ||
<argument name="product" defaultValue="_defaultProduct"/> | ||
</arguments> | ||
<remove keyForRemoval="clickClearFiltersAfter"/> | ||
</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
41 changes: 41 additions & 0 deletions
41
app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.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,41 @@ | ||
<?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="AdminCreateDuplicateCategoryTest"> | ||
<annotations> | ||
<stories value="Create category"/> | ||
<title value="Create Duplicate Category With Already Existed UrlKey"/> | ||
<description value="Login as admin and create duplicate category"/> | ||
<testCaseId value="MC-14702"/> | ||
<severity value="CRITICAL"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Open Category Page and select Add category --> | ||
<actionGroup ref="goToCreateCategoryPage" stepKey="goToCategoryPage"/> | ||
|
||
<!-- Fill the Category form with same name and urlKey as initially created category(SimpleSubCategory) --> | ||
<actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillCategoryForm"> | ||
<argument name="categoryName" value="$$category.name$$"/> | ||
<argument name="categoryUrlKey" value="$$category.custom_attributes[url_key]$$"/> | ||
</actionGroup> | ||
|
||
<!-- Assert error message --> | ||
<see selector="{{AdminCategoryMessagesSection.errorMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/> | ||
</test> | ||
</tests> |
61 changes: 61 additions & 0 deletions
61
app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.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,61 @@ | ||
<?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="AdminCreateDuplicateProductTest"> | ||
<annotations> | ||
<stories value="Create Product"/> | ||
<title value="Create Duplicate Product With Existed Subcategory Name And UrlKey"/> | ||
<description value="Login as admin and create duplicate Product"/> | ||
<testCaseId value="MC-14714"/> | ||
<severity value="CRITICAL"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<createData entity="SubCategory" stepKey="category"/> | ||
<createData entity="Two_nested_categories" stepKey="subCategory"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<actionGroup ref="LoginAsAdmin" stepKey="login"/> | ||
</before> | ||
|
||
<after> | ||
<deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Go to new simple product page --> | ||
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="goToCreateProductPage"/> | ||
|
||
<!-- Fill the main fields in the form --> | ||
<actionGroup ref="FillMainProductFormByString" stepKey="fillMainProductForm"> | ||
<argument name="productName" value="$$subCategory.name$$"/> | ||
<argument name="productSku" value="{{defaultSimpleProduct.sku}}"/> | ||
<argument name="productPrice" value="{{defaultSimpleProduct.price}}"/> | ||
<argument name="productQuantity" value="{{defaultSimpleProduct.quantity}}"/> | ||
<argument name="productStatus" value="{{defaultSimpleProduct.status}}"/> | ||
<argument name="productWeight" value="{{defaultSimpleProduct.weight}}"/> | ||
</actionGroup> | ||
|
||
<!-- Select the category that we created in the before block --> | ||
<actionGroup ref="SetCategoryByName" stepKey="setCategory"> | ||
<argument name="categoryName" value="$$category.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Set the url key to match the subcategory created in the before block --> | ||
<actionGroup ref="SetProductUrlKeyByString" stepKey="fillUrlKey"> | ||
<argument name="urlKey" value="$$subCategory.custom_attributes[url_key]$$"/> | ||
</actionGroup> | ||
|
||
<!-- Save the product and expect to see an error message --> | ||
<actionGroup ref="SaveProductFormNoSuccessCheck" stepKey="tryToSaveProduct"/> | ||
<see selector="{{AdminProductFormSection.successMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.