|
| 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="AwsS3AdminAddImageToWYSIWYGBlockTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Cms"/> |
| 13 | + <stories value="MC-37460: Support by Magento CMS"/> |
| 14 | + <group value="Cms"/> |
| 15 | + <title value="Admin should be able to add image to WYSIWYG content of Block with remote filesystem enabled"/> |
| 16 | + <description value="Admin should be able to add image to WYSIWYG content of Block with remote filesystem enabled"/> |
| 17 | + <severity value="BLOCKER"/> |
| 18 | + <testCaseId value="MC-38302"/> |
| 19 | + <group value="remote_storage_aws_s3"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <magentoCLI command="remote-storage:enable {{RemoteStorageAwsS3ConfigData.driver}} {{RemoteStorageAwsS3ConfigData.bucket}} {{RemoteStorageAwsS3ConfigData.region}} {{RemoteStorageAwsS3ConfigData.prefix}} {{RemoteStorageAwsS3ConfigData.access_key}} {{RemoteStorageAwsS3ConfigData.secret_key}} --is-public true" stepKey="enableRemoteStorage"/> |
| 23 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> |
| 24 | + <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 26 | + <actionGroup ref="AdminDisableWYSIWYGActionGroup" stepKey="disableWYSIWYGBeforeTest" /> |
| 27 | + <magentoCLI command='config:set cms/wysiwyg/enabled enabled' stepKey="enableWYSIWYGBeforeTest"/> |
| 28 | + <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> |
| 29 | + </before> |
| 30 | + <actionGroup ref="AssignBlockToCMSPage" stepKey="assignBlockToCMSPage"> |
| 31 | + <argument name="Block" value="$$createPreReqBlock$$"/> |
| 32 | + <argument name="CmsPage" value="$$createCMSPage$$"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage1"> |
| 35 | + <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
| 36 | + </actionGroup> |
| 37 | + <selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="All Store View" stepKey="selectAllStoreView" /> |
| 38 | + <waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE" /> |
| 39 | + <click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon" /> |
| 40 | + <waitForPageLoad stepKey="waitForPageLoad2" /> |
| 41 | + <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> |
| 42 | + <actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="VerifyMediaGalleryStorageBtn"/> |
| 43 | + <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToFolder"> |
| 44 | + <argument name="FolderName" value="Storage Root"/> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="CreateImageFolderActionGroup" stepKey="CreateImageFolder"> |
| 47 | + <argument name="ImageFolder" value="ImageFolder"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage1"> |
| 50 | + <argument name="Image" value="ImageUpload"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="DeleteImageActionGroup" stepKey="deleteImage"/> |
| 53 | + <actionGroup ref="AttachImageActionGroup" stepKey="attachImage2"> |
| 54 | + <argument name="Image" value="ImageUpload"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="SaveImageActionGroup" stepKey="insertImage"/> |
| 57 | + <actionGroup ref="FillOutUploadImagePopupActionGroup" stepKey="fillOutUploadImagePopup" /> |
| 58 | + <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/> |
| 59 | + <amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/> |
| 60 | + <waitForPageLoad stepKey="waitForPageLoad11" /> |
| 61 | + <!--see image on Storefront--> |
| 62 | + <seeElement selector="{{StorefrontBlockSection.mediaDescription}}" stepKey="assertMediaDescription"/> |
| 63 | + <seeElementInDOM selector="{{StorefrontBlockSection.imageSource(ImageUpload.fileName)}}" stepKey="assertMediaSource"/> |
| 64 | + <after> |
| 65 | + <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> |
| 66 | + <actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> |
| 67 | + <argument name="ImageFolder" value="ImageFolder"/> |
| 68 | + </actionGroup> |
| 69 | + <amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnEditPage"/> |
| 70 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 71 | + <conditionalClick selector="{{CmsPagesPageActionsSection.clearAllButton}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/> |
| 72 | + <waitForPageLoad stepKey="waitForGridReload"/> |
| 73 | + <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> |
| 74 | + <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> |
| 75 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 76 | + <actionGroup ref="AdminEnableWYSIWYGActionGroup" stepKey="enableWYSIWYGAfterTest" /> |
| 77 | + <magentoCLI command="remote-storage:disable" stepKey="disableRemoteStorage"/> |
| 78 | + </after> |
| 79 | + </test> |
| 80 | +</tests> |
0 commit comments