Skip to content

Added MFTF test to locate previewed image #713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<element name="countGridImages" type="text" selector="//div[@class='masonry-image-grid']/div[contains(.,data-repeat-index)]"/>
<element name="recordsFound" type="text" selector="//*[@id='adobe-stock-images-search-modal']//*[text()='records found']/parent::div"/>
<element name="mediaGalleryImage" type="button" selector="//img[contains(@alt,'{{imageName}}')]" parameterized="true"/>
<element name="mediaGalleryDeleteButton" type="button" selector="#delete_files"/>
<element name="mediaGalleryDeleteButton" type="button" selector="[data-ui-id=wysiwyg-images-content-delete-files-button]"/>
<element name="systemAclActions" type="checkbox" selector="//a[text()='Adobe Stock']/parent::li[contains(.,'Actions')]//a"/>
<element name="adobeSignIn" type="button" selector=".adobe-sign-in-button"/>
<element name="adobeImsPopupUserEmail" type="button" selector="#adobeid_username"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminAdobeStockImagePreviewLocateTest">
<annotations>
<features value="AdobeStockImagePanel"/>
<stories value="User locates preview image in the Media Gallery"/>
<title value="Adobe Stock Preview Saved Image Locate"/>
<description value="User can locate previously preview saved and unlicensed image in Media Gallery"/>
<severity value="CRITICAL"/>
<group value="adobe_stock_integration_preview"/>
<group value="adobe_stock_integration"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanel"/>
</before>
<after>
<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanel"/>
<actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetAdminDataGridToDefaultView"/>
<actionGroup ref="logout" stepKey="adminLogout"/>
</after>
<actionGroup ref="AdminSearchImagesOnModalActionGroup" stepKey="searchForUnlicensedImage">
<argument name="query" value="{{AdobeStockUnlicensedImage.id}}"/>
</actionGroup>
<actionGroup ref="AdminAdobeStockExpandImagePreviewActionGroup" stepKey="expandUnlicensedImage"/>
<click selector="{{AdobeStockImagePreviewSection.savePreview}}" stepKey="clickSavePreviewButton"/>
<waitForPageLoad stepKey="waitForPromptModal"/>
<grabValueFrom selector="{{AdobeStockImagePreviewSection.imageNameField}}" stepKey="grabImageFileName"/>
<click selector="{{AdobeStockImagePreviewSection.confirm}}" stepKey="clickOnPopupConfirm"/>
<waitForPageLoad stepKey="waitForMediaGalleryOpen"/>
<seeElement selector="{{AdobeStockSection.mediaGalleryImage({$grabImageFileName})}}" stepKey="assertSavedImage"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanelAgain"/>
<actionGroup ref="AdminAdobeStockImagePreviewLocateActionGroup" stepKey="locateImage"/>
<seeElement selector="{{AdobeStockSection.mediaGalleryImage({$grabImageFileName})}}" stepKey="imageLocated"/>
<actionGroup ref="AdminMediaGalleryDeleteImage" stepKey="deleteImageActionGroup">
<argument name="name" value="{$grabImageFileName}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
<button class="action-default primary" type="button" data-bind="visible: isLicensed(), click: function () { saveLicensed(); }">
<span translate="'Save'"></span>
</button>