|
| 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> |
0 commit comments