Skip to content

Commit fee318e

Browse files
committed
MAGETWO-85452: QA Activities
1 parent f6bc4ed commit fee318e

25 files changed

+1075
-17
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<actionGroup name="LoginActionGroup">
12+
<amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/>
13+
<fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" stepKey="fillUsername"/>
14+
<fillField userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" selector="{{AdminLoginFormSection.password}}" stepKey="fillPassword"/>
15+
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
16+
</actionGroup>
17+
</config>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<actionGroup name="logout">
12+
<amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/admin/auth/logout/" stepKey="amOnLogoutPage"/>
13+
</actionGroup>
14+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
10+
<cest name="AdminEditTextEditorProductAttributeCest">
11+
<annotations>
12+
<features value="TinyMCEv4"/>
13+
<stories value="Input type configuration for custom Product Attributes-MAGETWO-51484"/>
14+
<group value="editProductAttribute"/>
15+
<env value="chrome"/>
16+
<env value="firefox"/>
17+
<env value="phantomjs"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>
21+
<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>
22+
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
23+
<createData stepKey="myProductAttributeCreation" entity="productAttributeWithTwoOptions"/>
24+
<createData stepKey="myProductAttributeSetAssign" entity="AddToDefaultSet">
25+
<required-entity createDataKey="myProductAttributeCreation"/>
26+
</createData>
27+
</before>
28+
<test name="EditTextEditorProductAttributeCest">
29+
<annotations>
30+
<title value="Admin see TinyMCEv4.6 is native WYSIWYG on Product Page"/>
31+
<description value="Admin should be able to switch between 2 version of Tinymce in the admin back-end."/>
32+
<severity value="CRITICAL"/>
33+
<testCaseId value="MAGETWO-85745"/>
34+
</annotations>
35+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid1"/>
36+
<waitForPageLoad stepKey="waitForPageLoad1"/>
37+
<click selector="{{AdminProductAttributeGridSection.AttributeCode($$myProductAttributeCreation.attribute_code$$)}}" stepKey="navigateToAttributeEditPage1" />
38+
<waitForPageLoad stepKey="waitForPageLoad2" />
39+
<seeOptionIsSelected selector="{{AttributePropertiesSection.InputType}}" userInput="Text Editor" stepKey="seeTextEditorSelected" />
40+
<see selector="{{AttributePropertiesSection.InputType}}" userInput="Text Area" stepKey="seeTextArea1" />
41+
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Area" stepKey="selectTextArea" />
42+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab1"/>
43+
<dontSeeElement selector="{{StorefrontPropertiesSection.EnableWYSIWYG}}" stepKey="dontSeeWYSIWYGEnableField1" />
44+
<click selector="{{AttributePropertiesSection.Save}}" stepKey="saveAttribute1" />
45+
<waitForPageLoad stepKey="waitForPageLoad3" />
46+
<amOnPage url="{{AdminProductEditPage.url}}" stepKey="navigateToNewProduct"/>
47+
<waitForPageLoad stepKey="waitForPageLoad4"/>
48+
<fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
49+
<fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
50+
<fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
51+
<fillField userInput="{{_defaultProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
52+
<dontSeeElement selector="{{ProductAttributeWYSIWYGSection.TinyMCE4($$myProductAttributeCreation.attribute_code$$)}}" stepKey="dontSeeTinyMCE4" />
53+
<fillField selector="{{ProductAttributeWYSIWYGSection.TextArea($$myProductAttributeCreation.attribute_code$$)}}" userInput="Text Area" stepKey="fillContentTextarea" />
54+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
55+
<!-- Go to storefront product page, assert product content -->
56+
<amOnPage url="{{_defaultProduct.name}}.html" stepKey="navigateToProductPage"/>
57+
<waitForPageLoad stepKey="waitForPageLoad5"/>
58+
<see userInput="Text Area" stepKey="seeText2" />
59+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid2"/>
60+
<waitForPageLoad stepKey="waitForPageLoad6"/>
61+
<click selector="{{AdminProductAttributeGridSection.AttributeCode($$myProductAttributeCreation.attribute_code$$)}}" stepKey="navigateToAttributeEditPage2" />
62+
<waitForPageLoad stepKey="waitForPageLoad7" />
63+
<seeOptionIsSelected selector="{{AttributePropertiesSection.InputType}}" userInput="Text Area" stepKey="seeTextAreaSelected" />
64+
<see selector="{{AttributePropertiesSection.InputType}}" userInput="Text Editor" stepKey="seeTextEditor" />
65+
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Editor" stepKey="selectEditor" />
66+
<see userInput="Text Editor input type requires WYSIWYG to be enabled in Stores > Configuration > Content Management." stepKey="seeHintMsg" />
67+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab2"/>
68+
<dontSeeElement selector="{{StorefrontPropertiesSection.EnableWYSIWYG}}" stepKey="dontSeeWYSIWYGEnableField2" />
69+
<click selector="{{AttributePropertiesSection.Save}}" stepKey="saveAttribute8" />
70+
<waitForPageLoad stepKey="waitForPageLoad8"/>
71+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGrid" />
72+
<waitForPageLoad stepKey="waitForPageLoad9"/>
73+
<click selector="{{AdminProductGridActionSection.productName(_defaultProduct.name)}}" stepKey="navigateToEditProduct" />
74+
<waitForPageLoad stepKey="waitForPageLoad10" />
75+
<seeElement selector="{{ProductAttributeWYSIWYGSection.TinyMCE4($$myProductAttributeCreation.attribute_code$$)}}" stepKey="waitForPageLoad11"/>
76+
</test>
77+
<after>
78+
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
79+
<actionGroup ref="logout" stepKey="logout"/>
80+
</after>
81+
</cest>
82+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="ConfigurationStoresPage" url="admin/admin/system_config/edit/section/cms/" module="Catalog">
12+
<section name="WYSIWYGOptionsSection"/>
13+
</page>
14+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
<page name="ProductAttributePage" url="admin/catalog/product_attribute/new/" module="Catalog">
11+
<section name="AdminCreateProductAttributeSection"/>
12+
</page>
13+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
<page name="AdminProductAttributeGridPage" url="admin/catalog/product_attribute" module="Catalog">
11+
<section name="AdminProductAttributeGridSection"/>
12+
</page>
13+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
<page name="AdminProductAttributeSetGridPage" url="admin/catalog/product_set/" module="ProductAttributeSet">
11+
<section name="AdminProductAttributeSetGridSection"/>
12+
</page>
13+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AttributePropertiesSection">
12+
<element name="DefaultLabel" type="input" selector="#attribute_label"/>
13+
<element name="InputType" type="select" selector="#frontend_input"/>
14+
<element name="ValueRequired" type="select" selector="#is_required"/>
15+
<element name="AdvancedProperties" type="button" selector="#advanced_fieldset-wrapper"/>
16+
<element name="Default Value" type="input" selector="#default_value_text"/>
17+
<element name="Save" type="button" selector="#save"/>
18+
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//div[@class='mce-branding-powered-by']"/>
19+
<element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
20+
</section>
21+
<section name="StorefrontPropertiesSection">
22+
<element name="StoreFrontPropertiesTab" selector="#product_attribute_tabs_front" type="button"/>
23+
<element name="EnableWYSIWYG" type="select" selector="#enabled"/>
24+
</section>
25+
<section name="WYSIWYGProductAttributeSection">
26+
<element name="ShowHideBtn" type="button" selector="#toggledefault_value_texteditor"/>
27+
<element name="InsertImageBtn" type="button" selector=".scalable.action-add-image.plugin"/>
28+
<element name="InsertImageIcon" type="button" selector=".mce-i-image"/>
29+
<element name="InsertWidgetBtn" type="button" selector=".action-add-widget"/>
30+
<element name="InsertWidgetIcon" type="button" selector="div[aria-label='Insert Widget']"/>
31+
<element name="InsertVariableBtn" type="button" selector=".scalable.add-variable.plugin"/>
32+
<element name="InsertVariableIcon" type="button" selector="div[aria-label='Insert Variable']"/>
33+
<element name="Browse" type="button" selector=".mce-i-browse"/>
34+
<element name="BrowseUploadImage" type="file" selector=".fileupload" />
35+
<element name="image" type="text" selector="//small[text()='{{var1}}']" parameterized="true"/>
36+
<element name="imageSelected" type="text" selector="//small[text()='{{var1}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
37+
<element name="ImageSource" type="input" selector=".mce-combobox.mce-abs-layout-item.mce-last.mce-has-open" />
38+
<element name="ImageDescription" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-last" />
39+
<element name="Height" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-first" />
40+
<element name="UploadImage" type="file" selector=".fileupload" />
41+
<element name="OkBtn" type="button" selector="//span[text()='Ok']"/>
42+
<element name="InsertFile" type="text" selector="#insert_files"/>
43+
<element name="CreateFolder" type="button" selector="#new_folder" />
44+
<element name="DeleteSelectedBtn" type="text" selector="#delete_files"/>
45+
<element name="CancelBtn" type="button" selector="#cancel" />
46+
<element name="Style" type="button" selector=".mce-txt" />
47+
<element name="Bold" type="button" selector=".mce-i-bold" />
48+
<element name="Italic" type="button" selector=".mce-i-italic" />
49+
<element name="Underline" type="button" selector=".mce-i-underline" />
50+
<element name="AlignLeft" type="button" selector=".mce-i-alignleft" />
51+
<element name="AlignCenter" type="button" selector=".mce-i-aligncenter" />
52+
<element name="AlignRight" type="button" selector=".mce-i-alignright" />
53+
<element name="Bullet" type="button" selector=".mce-i-bullist" />
54+
<element name="Numlist" type="button" selector=".mce-i-numlist" />
55+
<element name="InsertLink" type="button" selector=".mce-i-link" />
56+
<element name="InsertImage" type="button" selector=".mce-i-image" />
57+
<element name="InsertTable" type="button" selector=".mce-i-table" />
58+
<element name="SpecialCharacter" type="button" selector=".mce-i-charmap" />
59+
<element name="TextArea" type="input" selector="#default_value_textarea" />
60+
</section>
61+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductAttributeGridSection">
12+
<element name="AttributeCode" type="text" selector="//td[contains(text(),'{{var1}}')]" parameterized="true"/>
13+
</section>
14+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductAttributeSetGridSection">
12+
<element name="AttributeSetName" type="text" selector="//td[contains(text(), '{{var1}}')]" parameterized="true"/>
13+
</section>
14+
</config>

0 commit comments

Comments
 (0)