-
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 #4372 from magento-pangolin/2.3-tests-mainline-pr
[AutomationTeam][Sprint#2] Deliver automated tests
- Loading branch information
Showing
62 changed files
with
1,385 additions
and
25 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
18 changes: 18 additions & 0 deletions
18
.../Magento/Catalog/Test/Mftf/ActionGroup/AdminFillProductAttributePropertiesActionGroup.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,18 @@ | ||
<?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="AdminFillProductAttributePropertiesActionGroup"> | ||
<arguments> | ||
<argument name="attributeName" type="string"/> | ||
<argument name="attributeType" type="string"/> | ||
</arguments> | ||
<fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{attributeName}}" stepKey="fillDefaultLabel"/> | ||
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{attributeType}}" stepKey="selectInputType"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenAttributeSetByNameActionGroup.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="AdminOpenAttributeSetByNameActionGroup"> | ||
<arguments> | ||
<argument name="attributeSetName" type="string" defaultValue="Default"/> | ||
</arguments> | ||
<click selector="{{AdminProductAttributeSetGridSection.AttributeSetName(attributeSetName)}}" stepKey="chooseAttributeSet"/> | ||
<waitForPageLoad stepKey="waitForAttributeSetPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenAttributeSetGridPageActionGroup.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,14 @@ | ||
<?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="AdminOpenAttributeSetGridPageActionGroup"> | ||
<amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetPage"/> | ||
<waitForPageLoad stepKey="waitForAttributeSetPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductAttributePageActionGroup.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,14 @@ | ||
<?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="AdminOpenProductAttributePageActionGroup"> | ||
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToAttributePage"/> | ||
<waitForPageLoad stepKey="waitForAttributePageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductIndexPageActionGroup.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,14 @@ | ||
<?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="AdminOpenProductIndexPageActionGroup"> | ||
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndexPage"/> | ||
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
...gento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontCustomProductAttributeActionGroup.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,18 @@ | ||
<?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="AssertStorefrontCustomProductAttributeActionGroup"> | ||
<arguments> | ||
<argument name="attributeLabel" type="string"/> | ||
<argument name="attributeValue" type="string"/> | ||
</arguments> | ||
<see userInput="{{attributeLabel}}" selector="{{StorefrontProductMoreInformationSection.customAttributeLabel(attributeLabel)}}" stepKey="seeAttributeLabel" /> | ||
<see userInput="{{attributeValue}}" selector="{{StorefrontProductMoreInformationSection.customAttributeValue(attributeLabel)}}" stepKey="seeAttributeValue" /> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
...gento/Catalog/Test/Mftf/ActionGroup/OpenStorefrontProductPageByProductNameActionGroup.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="OpenStorefrontProductPageByProductNameActionGroup"> | ||
<arguments> | ||
<argument name="productName" type="string" defaultValue="{{_defaultProduct.name}}"/> | ||
</arguments> | ||
<amOnPage url="{{productName}}.html" stepKey="amOnProductPage"/> | ||
<waitForPageLoad stepKey="waitForProductPageLoad"/> | ||
</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
23 changes: 23 additions & 0 deletions
23
app/code/Magento/Catalog/Test/Mftf/Data/WYSIWYGConfigData.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,23 @@ | ||
<?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="EnableWYSIWYG"> | ||
<data key="path">cms/wysiwyg/enabled</data> | ||
<data key="scope_id">0</data> | ||
<data key="label">Yes</data> | ||
<data key="value">enabled</data> | ||
</entity> | ||
<entity name="EnableTinyMCE4"> | ||
<data key="path">cms/wysiwyg/editor</data> | ||
<data key="scope_id">0</data> | ||
<data key="label">Yes</data> | ||
<data key="value">mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter</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
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
129 changes: 129 additions & 0 deletions
129
app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.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,129 @@ | ||
<?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="AdminCreateTextEditorProductAttributeTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Create product Attribute"/> | ||
<title value="Admin create text editor product attribute test"/> | ||
<description value="Create text editor product attribute with TinyMCE4 enabled"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-6338"/> | ||
<group value="catalog"/> | ||
</annotations> | ||
<before> | ||
<!-- Enable WYSIWYG editor --> | ||
<magentoCLI command="config:set {{EnableWYSIWYG.path}} {{EnableWYSIWYG.value}}" stepKey="enableWYSIWYG"/> | ||
|
||
<!-- Enable TinyMCE 4 --> | ||
<magentoCLI command="config:set {{EnableTinyMCE4.path}} {{EnableTinyMCE4.value}}" stepKey="enableTinyMCE4"/> | ||
|
||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!-- Delete attribute --> | ||
<actionGroup ref="deleteProductAttribute" stepKey="deleteAttribute"> | ||
<argument name="ProductAttribute" value="productTextEditorAttribute"/> | ||
</actionGroup> | ||
|
||
<!-- Delete product --> | ||
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
|
||
<!-- Log out --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Go to Stores > Product, click "Add New Attribute" --> | ||
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="openProductAttributePage"/> | ||
<click selector="{{AdminProductAttributeGridSection.createNewAttributeBtn}}" stepKey="createNewAttribute"/> | ||
|
||
<!-- Input value for Default Label. Verify dropdown of "Catalog Input Type for Store Owner" --> | ||
<actionGroup ref="AdminFillProductAttributePropertiesActionGroup" stepKey="fillAttributeProperties"> | ||
<argument name="attributeName" value="{{productTextEditorAttribute.attribute_code}}"/> | ||
<argument name="attributeType" value="{{productTextEditorAttribute.frontend_input}}"/> | ||
</actionGroup> | ||
|
||
<!-- Input value for "Catalog Input Type for Store Owner" --> | ||
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{productAttributeWysiwyg.frontend_input}}" stepKey="updateInputType"/> | ||
|
||
<!-- Click on "Storefront Properties" tab on left menu --> | ||
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/> | ||
<dontSeeElement selector="{{StorefrontPropertiesSection.EnableWYSIWYG}}" stepKey="dontSeeWYSIWYGEnableField"/> | ||
|
||
<!-- Selection for "Visible on Catalog Pages on Storefront" --> | ||
<selectOption selector="{{StorefrontPropertiesSection.visibleOnCatalogPagesOnStorefront}}" userInput="Yes" stepKey="enableVisibleOnStorefront"/> | ||
<scrollToTopOfPage stepKey="scrollToPageTop"/> | ||
|
||
<!-- Go back to "Properties" tab on left menu --> | ||
<click selector="{{AttributePropertiesSection.propertiesTab}}" stepKey="clickPropertiesTab"/> | ||
|
||
<!-- Updated value for "Catalog Input Type for Store Owner" --> | ||
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{productTextEditorAttribute.frontend_input}}" stepKey="returnInputType"/> | ||
|
||
<!-- Save Product Attribute --> | ||
<actionGroup ref="saveProductAttribute" stepKey="saveAttribute"/> | ||
|
||
<!-- Go to Store > Attribute Set --> | ||
<actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> | ||
|
||
<!-- From grid, click on attribute set Default --> | ||
<actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/> | ||
|
||
<!-- Add Product Attribute to Default attribute by dragging and dropping this to the 'Project Details' folder. Then Save. --> | ||
<actionGroup ref="AssignAttributeToGroup" stepKey="assignAttributeToGroup"> | ||
<argument name="group" value="Product Details"/> | ||
<argument name="attribute" value="{{productTextEditorAttribute.attribute_code}}"/> | ||
</actionGroup> | ||
<actionGroup ref="SaveAttributeSet" stepKey="saveAttributeSet"/> | ||
|
||
<!-- Go Catalog > Product to create new product page --> | ||
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductIndexPage"/> | ||
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProduct"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
|
||
<!-- On product page, select Attribute Set: "Default" --> | ||
<actionGroup ref="AdminProductPageSelectAttributeSet" stepKey="selectAttributeSet"> | ||
<argument name="attributeSetName" value="Default"/> | ||
</actionGroup> | ||
|
||
<!-- Created product attribute appear on product form --> | ||
<seeElement selector="{{AdminProductFormSection.attributeLabelByText(productTextEditorAttribute.attribute_code)}}" stepKey="seeAttributeLabelInProductForm"/> | ||
|
||
<!-- TinyMCE 4 is displayed in WYSIWYG content area --> | ||
<seeElement selector="{{TinyMCESection.TinyMCE4}}" stepKey="seeTinyMCE4"/> | ||
|
||
<!-- Verify toolbar menu --> | ||
<actionGroup ref="VerifyTinyMCEActionGroup" stepKey="verifyToolbarMenu"/> | ||
|
||
<!-- Click Show/Hide button and see Insert Image button --> | ||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||
<click selector="{{ProductAttributeWYSIWYGSection.showHideBtn(productTextEditorAttribute.attribute_code)}}" stepKey="clickShowHideBtn"/> | ||
<waitForElementVisible selector="{{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImageBtn"/> | ||
|
||
<!-- Add content into attribute --> | ||
<fillField selector="{{ProductDescriptionWysiwygSection.attributeEditArea(productTextEditorAttribute.attribute_code)}}" userInput="This content from product page" stepKey="setContent"/> | ||
|
||
<!-- Fill up all required fields for product form --> | ||
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm"/> | ||
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/> | ||
|
||
<!-- Assert product attribute on Storefront --> | ||
<actionGroup ref="OpenStorefrontProductPageByProductNameActionGroup" stepKey="openProductPage"/> | ||
<scrollTo stepKey="scrollToMoreInformation" selector="{{StorefrontProductMoreInformationSection.moreInformationSpecs}}" /> | ||
<actionGroup ref="AssertStorefrontCustomProductAttributeActionGroup" stepKey="checkAttributeInMoreInformationTab"> | ||
<argument name="attributeLabel" value="{{productTextEditorAttribute.attribute_code}}"/> | ||
<argument name="attributeValue" value="This content from product page"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
20 changes: 20 additions & 0 deletions
20
...ut/Test/Mftf/ActionGroup/StorefrontAssertShippingMethodOptionPresentInCartActionGroup.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"> | ||
<!-- Assert shipping method name and price are present in cart --> | ||
<actionGroup name="StorefrontAssertShippingMethodOptionPresentInCartActionGroup"> | ||
<arguments> | ||
<argument name="methodName" type="string"/> | ||
<argument name="price" type="string"/> | ||
</arguments> | ||
<see selector="{{CheckoutCartSummarySection.methodName}}" userInput="{{methodName}}" stepKey="seeShippingName"/> | ||
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="{{price}}" stepKey="seeShippingPrice"/> | ||
</actionGroup> | ||
</actionGroups> |
Oops, something went wrong.