Skip to content

Commit 66fe297

Browse files
committed
AC-252: Refactor core MFTF TinyMCE Section
- fix affected MFTF test
1 parent caef539 commit 66fe297

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForDescription" />
3939
<scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToDescriptionAgain"/>
4040
<click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon1" />
41-
<click selector="{{ProductDescriptionWysiwygSection.form}} {{MediaGallerySection.Browse}}" stepKey="clickBrowse1" />
41+
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowse1" />
4242
<waitForLoadingMaskToDisappear stepKey="waitForBrowseModal" />
4343
<see selector="{{MediaGallerySection.CancelBtn}}" userInput="Cancel" stepKey="seeCancelBtn1" />
4444
<see selector="{{MediaGallerySection.CreateFolder}}" userInput="Create Folder" stepKey="seeCreateFolderBtn1" />
@@ -48,11 +48,12 @@
4848
<fillField selector="{{MediaGallerySection.FolderName}}" userInput="{{ImageFolder.name}}" stepKey="fillFolderName1" />
4949
<click selector="{{MediaGallerySection.AcceptFolderName}}" stepKey="acceptFolderName11" />
5050
<conditionalClick selector="{{MediaGallerySection.StorageRootArrow}}" dependentSelector="{{MediaGallerySection.checkIfArrowExpand}}" stepKey="clickStorageRootArrowIfClosed" visible="true"/>
51+
<waitForLoadingMaskToDisappear stepKey="waitForStorageRootLoadingMaskDisappear"/>
5152
<conditionalClick selector="{{MediaGallerySection.WysiwygArrow}}" dependentSelector="{{MediaGallerySection.checkIfWysiwygArrowExpand}}" stepKey="clickWysiwygArrowIfClosed" visible="true"/>
5253
<waitForText userInput="{{ImageFolder.name}}" stepKey="waitForNewFolder1" />
5354
<click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder1" />
5455
<waitForLoadingMaskToDisappear stepKey="waitForLoading4"/>
55-
<attachFile selector="{{ProductDescriptionWysiwygSection.form}} {{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload1.value}}" stepKey="uploadImage1"/>
56+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload1.value}}" stepKey="uploadImage1"/>
5657
<waitForLoadingMaskToDisappear stepKey="waitForFileUpload1"/>
5758
<waitForElementVisible selector="{{MediaGallerySection.image(ImageUpload1.value)}}" stepKey="waitForUploadImage1" />
5859
<seeElement selector="{{MediaGallerySection.imageSelected(ImageUpload1.value)}}" stepKey="seeImageSelected1" />
@@ -63,7 +64,9 @@
6364
<waitForElementNotVisible selector="{{MediaGallerySection.image(ImageUpload1.value)}}" stepKey="waitForImageDeleted1" />
6465
<dontSeeElement selector="{{MediaGallerySection.image(ImageUpload1.value)}}" stepKey="dontSeeImage1" />
6566
<dontSeeElement selector="{{MediaGallerySection.InsertFile}}" stepKey="dontSeeAddSelectedBtn2" />
66-
<attachFile selector="{{ProductDescriptionWysiwygSection.form}} {{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload1.value}}" stepKey="uploadImage2"/>
67+
<click userInput="{{ImageFolder.name}}" stepKey="selectCreatedFolder1" />
68+
<waitForLoadingMaskToDisappear stepKey="waitForSelectFolder"/>
69+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload1.value}}" stepKey="uploadImage2"/>
6770
<waitForLoadingMaskToDisappear stepKey="waitForFileUpload2"/>
6871
<waitForElementVisible selector="{{MediaGallerySection.image(ImageUpload1.value)}}" stepKey="waitForUploadImage2" />
6972
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickInsertBtn1" />
@@ -73,7 +76,7 @@
7376
<click selector="{{MediaGallerySection.OkBtn}}" stepKey="clickOkBtn1" />
7477
<scrollTo selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" y="-150" x="0" stepKey="scrollToTinyMCE" />
7578
<click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon2" />
76-
<click selector="{{ProductShortDescriptionWysiwygSection.form}} {{MediaGallerySection.Browse}}" stepKey="clickBrowse2" />
79+
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowse2" />
7780
<waitForLoadingMaskToDisappear stepKey="waitForLoading13"/>
7881
<waitForElementVisible selector="{{MediaGallerySection.CancelBtn}}" stepKey="waitForCancelButton2"/>
7982
<see selector="{{MediaGallerySection.CancelBtn}}" userInput="Cancel" stepKey="seeCancelBtn2" />
@@ -83,7 +86,7 @@
8386
<click userInput="Storage Root" stepKey="clickOnRootFolder" />
8487
<waitForLoadingMaskToDisappear stepKey="waitForLoading15"/>
8588
<dontSeeElement selector="{{MediaGallerySection.InsertFile}}" stepKey="dontSeeAddSelectedBtn3" />
86-
<attachFile selector="{{ProductShortDescriptionWysiwygSection.form}} {{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage3"/>
89+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage3"/>
8790
<waitForLoadingMaskToDisappear stepKey="waitForFileUpload3"/>
8891
<waitForElementVisible selector="{{MediaGallerySection.image(ImageUpload3.value)}}" stepKey="waitForUploadImage3" />
8992
<waitForElement selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="waitForDeletebtn" />
@@ -92,7 +95,9 @@
9295
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForConfirm3"/>
9396
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete2" />
9497
<dontSeeElement selector="{{MediaGallerySection.InsertFile}}" stepKey="dontSeeAddSelectedBtn4" />
95-
<attachFile selector="{{ProductShortDescriptionWysiwygSection.form}} {{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage4"/>
98+
<click userInput="{{ImageFolder.name}}" stepKey="selectCreatedFolder2" />
99+
<waitForLoadingMaskToDisappear stepKey="waitForSelectFolder2"/>
100+
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{ImageUpload3.value}}" stepKey="uploadImage4"/>
96101
<waitForLoadingMaskToDisappear stepKey="waitForFileUpload4"/>
97102
<waitForElementVisible selector="{{MediaGallerySection.image(ImageUpload3.value)}}" stepKey="waitForUploadImage4" />
98103
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickInsertBtn" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<element name="InsertFile" type="text" selector="#insert_files" timeout="30"/>
2626
<element name="CreateFolder" type="button" selector="#new_folder" timeout="30"/>
2727
<element name="DeleteFolder" type="button" selector="#delete_folder"/>
28-
<element name="DeleteSelectedBtn" type="text" selector="#delete_files"/>
28+
<element name="DeleteSelectedBtn" type="button" selector="#delete_files" timeout="30"/>
2929
<element name="CancelBtn" type="button" selector="#cancel"/>
3030
<element name="FolderName" type="button" selector="input[data-role='promptField']"/>
3131
<element name="FolderContainer" type="button" selector="div[data-role='tree']"/>

0 commit comments

Comments
 (0)