Skip to content

Commit d465a50

Browse files
committed
Added MFTF test coverage
1 parent e272ef1 commit d465a50

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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="AdminSeeFolderInContentSectionOfProductTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Check default folder is visible for any product types"/>
15+
<title value="Admin should be able to see default folder is visible Simple Product in Content short description"/>
16+
<description value="Admin should be able to see default folder is visible Simple Product in Content short description"/>
17+
<severity value="BLOCKER"/>
18+
<testCaseId value="AC-9638"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/>
23+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" />
24+
<actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="enableOldMediaGallery">
25+
<argument name="enabled" value="1"/>
26+
</actionGroup>
27+
</before>
28+
<after>
29+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" />
30+
<actionGroup ref="AdminDisableWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
31+
<actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="enableOldMediaGallery">
32+
<argument name="enabled" value="0"/>
33+
</actionGroup>
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
35+
</after>
36+
37+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"/>
38+
<actionGroup ref="FillMainProductFormActionGroup" stepKey="fillBasicProductInfo" />
39+
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab" />
40+
<scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToDescription"/>
41+
<waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForDescription" />
42+
<scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToDescriptionAgain"/>
43+
<click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon1" />
44+
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowse1" />
45+
<waitForPageLoad stepKey="waitForBrowseModal" />
46+
<waitForElement selector="{{MediaGallerySection.CancelBtn}}" stepKey="waitForCancelBtn1" />
47+
<see selector="{{MediaGallerySection.CancelBtn}}" userInput="Cancel" stepKey="seeCancelBtn1" />
48+
<see selector="{{MediaGallerySection.UploadImageNew}}" userInput="Upload Image" stepKey="seeUploadImage" />
49+
<waitForElement selector="{{MediaGallerySection.wysiwygAnchor}}" stepKey="waitForWysiwygAnchor" />
50+
<see selector="{{MediaGallerySection.wysiwygAnchor}}" userInput="wysiwyg" stepKey="seeWysiwygAnchor" />
51+
52+
</test>
53+
</tests>

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/MediaGallerySection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
<element name="ImageDescriptionTinyMCE" type="input" selector="#alt" />
2121
<element name="Height" type="input" selector="//label[text()='Height']/parent::div//input"/>
2222
<element name="UploadImage" type="file" selector=".fileupload"/>
23+
<element name="UploadImageNew" type="file" selector="#upload_image"/>
2324
<element name="OkBtn" type="button" selector=".tox-dialog__footer button[title='Save']"/>
2425
<element name="insertBtn" type="button" selector="#insert"/>
2526
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
2627
<element name="CreateFolder" type="button" selector="#new_folder" timeout="30"/>
2728
<element name="DeleteFolder" type="button" selector="#delete_folder"/>
2829
<element name="DeleteSelectedBtn" type="button" selector="#delete_files" timeout="30"/>
2930
<element name="CancelBtn" type="button" selector="#cancel"/>
31+
<element name="wysiwygAnchor" type="button" selector="#wysiwyg_anchor"/>
3032
<element name="FolderName" type="button" selector="input[data-role='promptField']"/>
3133
<element name="FolderContainer" type="button" selector="div[data-role='tree']"/>
3234
<element name="AcceptFolderName" type="button" selector=".action-primary.action-accept"/>

0 commit comments

Comments
 (0)