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
+ <tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
11
+ <test name =" AdminAddImageToCMSPageTinyMCE3Test" >
12
+ <annotations >
13
+ <features value =" Cms" />
14
+ <stories value =" Admin should be able to upload images with TinyMCE3 WYSIWYG" />
15
+ <group value =" Cms" />
16
+ <title value =" Verify that admin is able to upload image to a CMS Page with TinyMCE3 enabled" />
17
+ <description value =" Verify that admin is able to upload image to CMS Page with TinyMCE3 enabled" />
18
+ <severity value =" MAJOR" />
19
+ <testCaseId value =" MAGETWO-95725" />
20
+ </annotations >
21
+ <before >
22
+ <actionGroup ref =" LoginActionGroup" stepKey =" loginGetFromGeneralFile" />
23
+ <actionGroup ref =" EnabledWYSIWYG" stepKey =" enableWYSIWYG" />
24
+ <comment userInput =" Choose TinyMCE3 as the default editor" stepKey =" chooseTinyMCE3AsEditor" />
25
+ <waitForElementVisible selector =" {{ContentManagementSection.SwitcherSystemValue}}" stepKey =" waitForCheckbox1" />
26
+ <uncheckOption selector =" {{ContentManagementSection.SwitcherSystemValue}}" stepKey =" uncheckUseSystemValue2" />
27
+ <waitForElementVisible selector =" {{ContentManagementSection.Switcher}}" stepKey =" waitForSwitcherDropdown1" />
28
+ <selectOption selector =" {{ContentManagementSection.Switcher}}" userInput =" TinyMCE 3" stepKey =" switchToVersion3" />
29
+ <click selector =" {{ContentManagementSection.WYSIWYGOptions}}" stepKey =" collapseWYSIWYGOptions1" />
30
+ <click selector =" {{ContentManagementSection.Save}}" stepKey =" saveConfig1" />
31
+ </before >
32
+ <after >
33
+ <comment userInput =" Reset editor as TinyMCE4" stepKey =" chooseTinyMCE4AsEditor" />
34
+ <amOnPage url =" {{ConfigurationStoresPage.url}}" stepKey =" navigateToConfigurationPage" />
35
+ <waitForPageLoad stepKey =" waitForConfigPageToReload" />
36
+ <conditionalClick stepKey =" expandWYSIWYGOptions" selector =" {{ContentManagementSection.WYSIWYGOptions}}" dependentSelector =" {{ContentManagementSection.CheckIfTabExpand}}" visible =" true" />
37
+ <waitForElementVisible selector =" {{ContentManagementSection.SwitcherSystemValue}}" stepKey =" waitForCheckbox2" />
38
+
39
+ <waitForElementVisible selector =" {{ContentManagementSection.Switcher}}" stepKey =" waitForSwitcherDropdown3" />
40
+ <selectOption selector =" {{ContentManagementSection.Switcher}}" userInput =" TinyMCE 4" stepKey =" switchToVersion4" />
41
+ <checkOption selector =" {{ContentManagementSection.SwitcherSystemValue}}" stepKey =" checkUseSystemValue2" />
42
+ <click selector =" {{ContentManagementSection.WYSIWYGOptions}}" stepKey =" collapseWYSIWYGOptions2" />
43
+ <click selector =" {{ContentManagementSection.Save}}" stepKey =" saveConfig2" />
44
+ <actionGroup ref =" logout" stepKey =" logOut" />
45
+ </after >
46
+ <amOnPage url =" {{CmsNewPagePage.url}}" stepKey =" navigateToPage2" />
47
+ <waitForPageLoad stepKey =" wait5" />
48
+ <fillField selector =" {{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput =" {{_defaultCmsPage.title}}" stepKey =" fillFieldTitle2" />
49
+ <click selector =" {{CmsNewPagePageContentSection.header}}" stepKey =" clickContentTab2" />
50
+ <waitForElementVisible selector =" {{TinyMCESection.TinyMCE3}}" stepKey =" waitForTinyMCE3" />
51
+ <seeElement selector =" {{TinyMCESection.TinyMCE3}}" stepKey =" seeTinyMCE3" />
52
+ <comment userInput =" Click Insert image button" stepKey =" clickImageButton" />
53
+ <click selector =" {{TinyMCESection.InsertImageBtnTinyMCE3}}" stepKey =" clickInsertImage" />
54
+ <waitForPageLoad stepKey =" waitForiFrameToLoad" />
55
+ <comment userInput =" switching to iFrame" stepKey =" iFramecomment" />
56
+ <executeJS function =" document.querySelector('.clearlooks2 iframe').setAttribute('name', 'insert-image');" stepKey =" makeIFrameInteractable" />
57
+ <switchToIFrame selector =" insert-image" stepKey =" switchToIFrame" />
58
+ <click selector =" {{MediaGallerySection.browseForImage}}" stepKey =" clickBrowse" />
59
+ <switchToIFrame stepKey =" switchOutOfIFrame" />
60
+ <waitForPageLoad stepKey =" waitForPageToLoad" />
61
+ <actionGroup ref =" CreateImageFolder" stepKey =" CreateImageFolder" >
62
+ <argument name =" ImageFolder" value =" ImageFolder" />
63
+ </actionGroup >
64
+ <actionGroup ref =" attachImage" stepKey =" attachImage1" >
65
+ <argument name =" Image" value =" ImageUpload" />
66
+ </actionGroup >
67
+ <actionGroup ref =" saveImage" stepKey =" insertImage" />
68
+ <comment userInput =" switching back to iFrame" stepKey =" switchBackToIFrame" />
69
+ <executeJS function =" document.querySelector('.clearlooks2 iframe').setAttribute('name', 'insert-image');" stepKey =" makeIFrameInteractable2" />
70
+ <switchToIFrame selector =" insert-image" stepKey =" switchToIFrame2" />
71
+ <waitForElementVisible selector =" {{MediaGallerySection.insertBtn}}" stepKey =" waitForInsertBtnOnIFrame" />
72
+ <fillField selector =" {{MediaGallerySection.ImageDescription}}" userInput =" {{ImageUpload.content}}" stepKey =" fillImageDescription" />
73
+ <click selector =" {{MediaGallerySection.insertBtn}}" stepKey =" clickInsertBtn" />
74
+ <waitForPageLoad stepKey =" wait3" />
75
+ <click selector =" {{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey =" expandButtonMenu" />
76
+ <waitForElementVisible selector =" {{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey =" waitForSplitButtonMenuVisible" />
77
+ <click selector =" {{CmsNewPagePageActionsSection.savePage}}" stepKey =" clickSavePage" />
78
+ <see userInput =" You saved the page." stepKey =" seeSuccessMessage" />
79
+ </test >
80
+ </tests >
0 commit comments