This repository has been archived by the owner on Dec 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 154
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 #4414 from magento-pangolin/2.3-tests-pr
Regression Automation Team Sprint #3
- Loading branch information
Showing
36 changed files
with
877 additions
and
31 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
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/AdminChangeProductSEOSettingsActionGroup.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="AdminChangeProductSEOSettingsActionGroup"> | ||
<arguments> | ||
<argument name="productName" defaultValue="_defaultProduct.name"/> | ||
</arguments> | ||
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickSearchEngineOptimizationTab"/> | ||
<waitForPageLoad stepKey="waitForTabOpen"/> | ||
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{productName}}" stepKey="setUrlKeyInput"/> | ||
<fillField selector="{{AdminProductSEOSection.metaTitleInput}}" userInput="{{productName}}" stepKey="setMetaTitleInput"/> | ||
<fillField selector="{{AdminProductSEOSection.metaKeywordsInput}}" userInput="{{productName}}" stepKey="setMetaKeywordsInput"/> | ||
<fillField selector="{{AdminProductSEOSection.metaDescriptionInput}}" userInput="{{productName}}" stepKey="setMetaDescriptionInput"/> | ||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetProductDesignSettingsActionGroup.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,20 @@ | ||
<?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="AdminSetProductDesignSettingsActionGroup"> | ||
<arguments> | ||
<argument name="designSettings" defaultValue="simpleBlankDesign"/> | ||
</arguments> | ||
<click selector="{{ProductDesignSection.DesignTab}}" stepKey="clickDesignTab"/> | ||
<waitForPageLoad stepKey="waitForTabOpen"/> | ||
<selectOption selector="{{ProductDesignSection.LayoutDropdown}}" userInput="{{designSettings.page_layout}}" stepKey="setLayout"/> | ||
<selectOption selector="{{ProductDesignSection.productOptionsContainer}}" userInput="{{designSettings.options_container}}" stepKey="setDisplayProductOptions"/> | ||
</actionGroup> | ||
</actionGroups> |
21 changes: 21 additions & 0 deletions
21
.../Magento/Catalog/Test/Mftf/ActionGroup/AdminSwitchProductGiftMessageStatusActionGroup.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,21 @@ | ||
<?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="AdminSwitchProductGiftMessageStatusActionGroup"> | ||
<arguments> | ||
<argument name="status" defaultValue="0"/> | ||
</arguments> | ||
<click selector="{{AdminProductGiftOptionsSection.giftOptions}}" stepKey="clickToExpandGiftOptionsTab"/> | ||
<waitForPageLoad stepKey="waitForGiftOptionsOpen"/> | ||
<uncheckOption selector="{{AdminProductGiftOptionsSection.useConfigSettingsMessage}}" stepKey="uncheckConfigSettingsMessage"/> | ||
<click selector="{{AdminProductGiftOptionsSection.toggleProductGiftMessage}}" stepKey="clickToGiftMessageSwitcher"/> | ||
<seeElement selector="{{AdminProductGiftOptionsSection.giftMessageStatus('status')}}" stepKey="assertGiftMessageStatus"/> | ||
</actionGroup> | ||
</actionGroups> |
19 changes: 19 additions & 0 deletions
19
...de/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertGiftMessageFieldsActionGroup.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,19 @@ | ||
<?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="StorefrontAssertGiftMessageFieldsActionGroup"> | ||
<waitForElementVisible selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="waitForCartGiftOptionVisible"/> | ||
<click selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="clickGiftOptionBtn"/> | ||
<seeElement selector="{{StorefrontProductCartGiftOptionSection.fieldTo}}" stepKey="seeFieldTo"/> | ||
<seeElement selector="{{StorefrontProductCartGiftOptionSection.fieldFrom}}" stepKey="seeFieldFrom"/> | ||
<seeElement selector="{{StorefrontProductCartGiftOptionSection.message}}" stepKey="seeMessageArea"/> | ||
<seeElement selector="{{StorefrontProductCartGiftOptionSection.update}}" stepKey="seeUpdateButton"/> | ||
<seeElement selector="{{StorefrontProductCartGiftOptionSection.cancel}}" stepKey="seeCancelButton"/> | ||
</actionGroup> | ||
</actionGroups> |
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Catalog/Test/Mftf/Data/ProductDesignData.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,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> | ||
<entity name="simpleBlankDesign" type="product"> | ||
<data key="custom_design">Magento Blank</data> | ||
<data key="page_layout">2 columns with left bar</data> | ||
<data key="options_container">Product Info Column</data> | ||
</entity> | ||
<entity name="simpleLumaDesign" type="product"> | ||
<data key="custom_design">Magento Luma</data> | ||
<data key="page_layout">Empty</data> | ||
<data key="options_container">Block after Info Column</data> | ||
</entity> | ||
</entities> |
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
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGiftOptionsSection.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. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminProductGiftOptionsSection"> | ||
<element name="giftOptions" type="text" selector="div[data-index='gift-options']"/> | ||
<element name="useConfigSettingsMessage" type="checkbox" selector="[name='product[use_config_gift_message_available]']"/> | ||
<element name="toggleProductGiftMessage" type="button" selector="input[name='product[gift_message_available]']+label"/> | ||
<element name="giftMessageStatus" type="checkbox" selector="input[name='product[gift_message_available]'][value='{{status}}']" parameterized="true"/> | ||
</section> | ||
</sections> |
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
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageDesignSection.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,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="StorefrontProductPageDesignSection"> | ||
<element name="layoutTwoColumnsLeft" type="block" selector=".page-layout-2columns-left"/> | ||
<element name="layoutEmpty" type="block" selector=".page-layout-empty"/> | ||
</section> | ||
</sections> |
136 changes: 136 additions & 0 deletions
136
app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.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,136 @@ | ||
<?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="AdminCreateAndEditSimpleProductSettingsTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Create/Edit simple product in Admin"/> | ||
<title value="Admin should be able to set/edit other product information when creating/editing a simple product"/> | ||
<description value="Admin should be able to set/edit product information when creating/editing a simple product"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-3241"/> | ||
<group value="Catalog"/> | ||
</annotations> | ||
<before> | ||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!-- Create related products --> | ||
<createData entity="SimpleProduct2" stepKey="createFirstRelatedProduct"/> | ||
<createData entity="SimpleProduct2" stepKey="createSecondRelatedProduct"/> | ||
<createData entity="SimpleProduct2" stepKey="createThirdRelatedProduct"/> | ||
</before> | ||
<after> | ||
<!-- Delete related products --> | ||
<deleteData createDataKey="createFirstRelatedProduct" stepKey="deleteFirstRelatedProduct"/> | ||
<deleteData createDataKey="createSecondRelatedProduct" stepKey="deleteSecondRelatedProduct"/> | ||
<deleteData createDataKey="createThirdRelatedProduct" stepKey="deleteThirdRelatedProduct"/> | ||
|
||
<!-- Log out --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Create new simple product --> | ||
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="createSimpleProduct"/> | ||
|
||
<!-- Fill all main fields --> | ||
<actionGroup ref="fillMainProductForm" stepKey="fillAllNecessaryFields"/> | ||
|
||
<!-- Add two related products --> | ||
<actionGroup ref="addRelatedProductBySku" stepKey="addFirstRelatedProduct"> | ||
<argument name="sku" value="$$createFirstRelatedProduct.sku$$"/> | ||
</actionGroup> | ||
<actionGroup ref="addRelatedProductBySku" stepKey="addSecondRelatedProduct"> | ||
<argument name="sku" value="$$createSecondRelatedProduct.sku$$"/> | ||
</actionGroup> | ||
|
||
<!-- Set Design settings for the product --> | ||
<actionGroup ref="AdminSetProductDesignSettingsActionGroup" stepKey="setProductDesignSettings"/> | ||
|
||
<!-- Set Gift Options settings for the product --> | ||
<actionGroup ref="AdminSwitchProductGiftMessageStatusActionGroup" stepKey="enableGiftMessageSettings"> | ||
<argument name="status" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Save product form --> | ||
<actionGroup ref="saveProductForm" stepKey="clickSaveButton"/> | ||
|
||
<!-- Open product page --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage"> | ||
<argument name="productUrl" value="{{_defaultProduct.name}}"/> | ||
</actionGroup> | ||
|
||
<!-- Assert related products at the storefront --> | ||
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createFirstRelatedProduct.name$$)}}" stepKey="seeFirstRelatedProductInStorefront"/> | ||
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createSecondRelatedProduct.name$$)}}" stepKey="seeSecondRelatedProductInStorefront"/> | ||
|
||
<!-- Assert product design settings "left bar is present at product page with 2 columns" --> | ||
<seeElement selector="{{StorefrontProductPageDesignSection.layoutTwoColumnsLeft}}" stepKey="seeDesignChanges"/> | ||
|
||
<!-- Assert Gift Option product settings is present --> | ||
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> | ||
<argument name="product" value="_defaultProduct"/> | ||
<argument name="productCount" value="1"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCart"/> | ||
<actionGroup ref="StorefrontAssertGiftMessageFieldsActionGroup" stepKey="assertGiftMessageFieldsArePresent"/> | ||
|
||
<!-- Open created product --> | ||
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
|
||
<!-- Edit product Search Engine Optimization settings --> | ||
<actionGroup ref="AdminChangeProductSEOSettingsActionGroup" stepKey="editProductSEOSettings"> | ||
<argument name="productName" value="SimpleProduct.name"/> | ||
</actionGroup> | ||
|
||
<!-- Edit related products --> | ||
<actionGroup ref="addRelatedProductBySku" stepKey="addThirdRelatedProduct"> | ||
<argument name="sku" value="$$createThirdRelatedProduct.sku$$"/> | ||
</actionGroup> | ||
<click selector="{{AdminProductFormRelatedUpSellCrossSellSection.removeRelatedProduct($$createFirstRelatedProduct.sku$$)}}" stepKey="removeFirstRelatedProduct"/> | ||
|
||
<!-- Edit Design settings for the product --> | ||
<actionGroup ref="AdminSetProductDesignSettingsActionGroup" stepKey="editProductDesignSettings"> | ||
<argument name="designSettings" value="simpleLumaDesign"/> | ||
</actionGroup> | ||
|
||
<!-- Edit Gift Option product settings --> | ||
<actionGroup ref="AdminSwitchProductGiftMessageStatusActionGroup" stepKey="disableGiftMessageSettings"/> | ||
|
||
<!-- Save product form --> | ||
<actionGroup ref="saveProductForm" stepKey="clickSaveProduct"/> | ||
|
||
<!-- Verify Url Key after changing --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> | ||
<argument name="productUrl" value="{{SimpleProduct.name}}"/> | ||
</actionGroup> | ||
|
||
<!-- Assert related products at the storefront --> | ||
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createSecondRelatedProduct.name$$)}}" stepKey="seeSecondRelatedProduct"/> | ||
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeThirdRelatedProduct"/> | ||
|
||
<!-- Assert product design settings "Layout empty" --> | ||
<seeElement selector="{{StorefrontProductPageDesignSection.layoutEmpty}}" stepKey="seeNewDesignChanges"/> | ||
|
||
<!-- Assert Gift Option product settings --> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> | ||
<dontSeeElement selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="dontSeeGiftOptionBtn"/> | ||
|
||
<!-- Delete created simple product --> | ||
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
Oops, something went wrong.