Skip to content

Commit d574dce

Browse files
authored
Merge pull request magento#4847 from magento-epam/MC-18709
- fixed MC-18709 [WYSIWYG]Spinner is Always Displayed on Media Gallery popup
2 parents d69f3e8 + d2e817b commit d574dce

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminAddImageToCMSBlockContent">
11+
<arguments>
12+
<argument name="image" type="entity" defaultValue="MagentoLogo"/>
13+
</arguments>
14+
<click selector="{{TinyMCESection.InsertImage}}" stepKey="clickAddImageButton"/>
15+
<waitForElementVisible selector="{{MediaGallerySection.Browse}}" stepKey="waitForBrowseImage"/>
16+
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowseImage"/>
17+
<waitForElementVisible selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="waitForAttacheFiles"/>
18+
<waitForLoadingMaskToDisappear stepKey="waitForStorageRootLoadingMaskDisappear"/>
19+
<click selector="{{MediaGallerySection.StorageRootArrow}}" stepKey="clickRoot"/>
20+
<waitForPageLoad stepKey="waitForPageLoad"/>
21+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{image.file}}" stepKey="attachLogo"/>
22+
<waitForElementVisible selector="{{MediaGallerySection.InsertFile}}" stepKey="waitForAddSelected"/>
23+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/>
24+
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickAddSelected"/>
25+
<waitForElementVisible selector="{{MediaGallerySection.OkBtn}}" stepKey="waitForOkButton"/>
26+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
27+
<click selector="{{MediaGallerySection.OkBtn}}" stepKey="clickOk"/>
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
</section>
2525
<section name="BlockContentSection">
2626
<element name="TextArea" type="input" selector="#cms_block_form_content"/>
27+
<element name="image" type="file" selector="#tinymce img"/>
28+
<element name="contentIframe" type="iframe" selector="cms_block_form_content_ifr"/>
2729
</section>
2830
<section name="CmsBlockBlockActionSection">
2931
<element name="deleteBlock" type="button" selector="#delete" timeout="30"/>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminMediaGalleryPopupUploadImagesWithoutErrorTest">
11+
<annotations>
12+
<features value="Cms"/>
13+
<stories value="Spinner is Always Displayed on Media Gallery popup"/>
14+
<title value="Media Gallery popup upload images without error"/>
15+
<description value="Media Gallery popup upload images without error"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-18962"/>
18+
<useCaseId value="MC-18709"/>
19+
<group value="Cms"/>
20+
</annotations>
21+
<before>
22+
<!--Enable WYSIWYG options-->
23+
<comment userInput="Enable WYSIWYG options" stepKey="commentEnableWYSIWYG"/>
24+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYGEditor"/>
25+
<magentoCLI command="config:set cms/wysiwyg/editor 'TinyMCE 4'" stepKey="setValueWYSIWYGEditor"/>
26+
<!--Create block-->
27+
<comment userInput="Create block" stepKey="commentCreateBlock"/>
28+
<createData entity="Sales25offBlock" stepKey="createBlock"/>
29+
<actionGroup ref="LoginActionGroup" stepKey="login"/>
30+
</before>
31+
<after>
32+
<!--Disable WYSIWYG options-->
33+
<comment userInput="Disable WYSIWYG options" stepKey="commentDisableWYSIWYG"/>
34+
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/>
35+
<deleteData createDataKey="createBlock" stepKey="deleteBlock" />
36+
<actionGroup ref="logout" stepKey="logout"/>
37+
</after>
38+
<!--Open created block page and add image-->
39+
<comment userInput="Open create block page and add image" stepKey="commentOpenBlockPage"/>
40+
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage1">
41+
<argument name="CMSBlockPage" value="$$createBlock$$"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImage">
44+
<argument name="image" value="TestImageNew"/>
45+
</actionGroup>
46+
<click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnFirstTime"/>
47+
<click selector="{{BlockWYSIWYGSection.ShowHideBtn}}" stepKey="clickShowHideBtnSecondTime"/>
48+
<waitForPageLoad stepKey="waitForPageLoad"/>
49+
<!--Switch to content frame and click on image-->
50+
<comment userInput="Switch to content frame and click on image" stepKey="commentSwitchToIframe"/>
51+
<switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrame"/>
52+
<click selector="{{BlockContentSection.image}}" stepKey="clickImage"/>
53+
<switchToIFrame stepKey="switchBack"/>
54+
<!--Add image second time and assert-->
55+
<comment userInput="Add image second time and assert" stepKey="commentAddImageAndAssert"/>
56+
<actionGroup ref="AdminAddImageToCMSBlockContent" stepKey="addImageSecondTime">
57+
<argument name="image" value="MagentoLogo"/>
58+
</actionGroup>
59+
<switchToIFrame selector="{{BlockContentSection.contentIframe}}" stepKey="switchToContentFrameSecondTime"/>
60+
<seeElement selector="{{BlockContentSection.image}}" stepKey="seeImageElement"/>
61+
</test>
62+
</tests>

0 commit comments

Comments
 (0)