Skip to content

MFTF Automation for: User locates licensed and uploaded image inside Media Gallery #639

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 9 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
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminAdobeStockImagePreviewLocateActionGroup">
<click selector="{{AdobeStockImagePreviewSection.locateImage}}" stepKey="clickLocate"/>
<waitForPageLoad stepKey="waitForMediaGalleryOpen"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<element name="savePreview" type="button" selector="//button[@class='action-secondary']//span[text()='Save Preview']"/>
<element name="licenseAndSave" type="button" selector="//button[@class='action-default primary']//span[text()='License and Save']"/>
<element name="save" type="block" selector="//button[@class='action-secondary']//span[text()='Save Preview']"/>
<element name="locateImage" type="block" selector="//button[@class='action-secondary']//span[text()='Locate')]"/>
<element name="locateImage" type="block" selector="//button[@class='action-secondary']//span[text()='Locate']"/>
<element name="saveLicensedImage" type="button" selector="//div[@class='actions']/descendant::span[text()='Save']"/>
<element name="image" type="block" selector="//div[@class='masonry-image-preview']//img"/>
<element name="navigation" type="button" selector="//div[@class='masonry-image-preview']//div[contains(@class, 'action-buttons')]/button[@class='action-{{type}}']" parameterized="true"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?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="AdminAdobeStockSavedLicensedImageLocateTest">
<annotations>
<features value="AdobeStockImagePanel"/>
<stories value="User locates licensed and uploaded image inside Media Gallery"/>
<title value="Adobe Stock Saved Licensed Image Locate"/>
<description value="User can locate previously licensed and saved image in Media Gallery"/>
<severity value="CRITICAL"/>
<group value="adobe_stock_integration_license"/>
<group value="adobe_stock_integration"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanel"/>
<actionGroup ref="AdminAdobeStockClickSignInActionGroup" stepKey="clickOnSignIn"/>
<actionGroup ref="AdminAdobeStockImsPopupSignInFillUserDataActionGroup" stepKey="fillUserCredentials"/>
<actionGroup ref="AdminAdobeStockImsPopupClickSignInActionGroup" stepKey="clickSignInImsPopup"/>
<actionGroup ref="AdminAdobeStockAssertUserLoggedActionGroup" stepKey="assertUserLoggedIn"/>
</before>
<after>
<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanel"/>
<actionGroup ref="AdminAdobeStockUserSignOutActionGroup" stepKey="adobeLogout"/>
<actionGroup ref="AdminAdobeStockAssertUserNotLoggedActionGroup" stepKey="assertAdobeUserLoggedOut"/>
<actionGroup ref="resetAdminDataGridToDefaultView" stepKey="resetAdminDataGridToDefaultView"/>
<actionGroup ref="logout" stepKey="adminLogout"/>
</after>
<actionGroup ref="AdminSearchImagesOnModalActionGroup" stepKey="searchForLicensedImage">
<argument name="query" value="{{AdobeStockLicensedImage.id}}"/>
</actionGroup>
<actionGroup ref="AdminAdobeStockExpandImagePreviewActionGroup" stepKey="expandLicensedImage"/>
<click selector="{{AdobeStockImagePreviewSection.saveLicensedImage}}" stepKey="clickSave"/>
<waitForPageLoad stepKey="waitForPromptModal"/>
<grabValueFrom selector="{{AdobeStockImagePreviewSection.imageNameField}}" stepKey="grabSaveImageFileName"/>
<click selector="{{AdobeStockImagePreviewSection.confirm}}" stepKey="clickOnPopupConfirm"/>
<waitForPageLoad stepKey="waitForMediaGalleryOpen"/>
<seeElement selector="{{AdobeStockSection.mediaGalleryImage({$grabSaveImageFileName})}}" stepKey="imageSaved"/>
<actionGroup ref="AdminAdobeStockOpenPanelFromMediaGalleryActionGroup" stepKey="openAdobeStockPanelAgain"/>
<actionGroup ref="AdminAdobeStockImagePreviewLocateActionGroup" stepKey="locateImage"/>
<seeElement selector="{{AdobeStockSection.mediaGalleryImage({$grabSaveImageFileName})}}" stepKey="imageLocated"/>
<actionGroup ref="AdminMediaGalleryDeleteImage" stepKey="deleteImageActionGroup">
<argument name="name" value="{$grabSaveImageFileName}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<button class="action-secondary" type="button" data-bind="visible: !isDownloaded() && !isLicensed(), click: function(){ savePreview() }">
<span translate="'Save Preview'"/>
</button>
<button class="action-secondary" type="button" data-bind="visible: isDownloaded(), click: function(){ locate() }">
<button class="action-secondary"
type="button"
data-bind="visible: isDownloaded(), click: function(){ locate() }">
<span translate="'Locate'"/>
</button>
<button class="action-default primary"
Expand Down