Skip to content

Commit

Permalink
magento#1515: MFTF test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Jul 26, 2020
1 parent 837ded8 commit daa221f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<description>Verifies image keywords on the View Details panel</description>
</annotations>
<arguments>
<argument name="keywords" />
<argument name="keywords"/>
</arguments>

<grabTextFrom selector="{{AdminEnhancedMediaGalleryViewDetailsSection.keywords}}" stepKey="grabDescription"/>
<assertStringContainsString stepKey="verifyDescription">
<actualResult type="variable">grabDescription</actualResult>
<grabTextFrom selector="{{AdminEnhancedMediaGalleryViewDetailsSection.keywords}}" stepKey="grabKeywords"/>
<assertStringContainsString stepKey="verifyKeywords">
<actualResult type="variable">grabKeywords</actualResult>
<expectedResult type="string">{{keywords}}</expectedResult>
</assertStringContainsString>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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="AdminMediaGalleryEditAssetAddKeywordActionGroup">
<annotations>
<description>Set Keywords on the Edit Details panel</description>
</annotations>
<arguments>
<argument name="keyword"/>
</arguments>

<fillField selector="{{AdminEnhancedMediaGalleryEditDetailsSection.newKeyword}}" userInput="{{keyword}}" stepKey="enterKeyword"/>
<click selector="{{AdminEnhancedMediaGalleryEditDetailsSection.addNewKeyword}}" stepKey="addKeyword"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<data key="file">magento.jpg</data>
<data key="fileName">renamed title</data>
<data key="extension">jpg</data>
<data key="keyword">newkeyword</data>
</entity>
<entity name="ImageMetadata" type="image">
<data key="title">Title of the magento image</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<element name="title" type="input" selector="#title"/>
<element name="fileName" type="text" selector="#path"/>
<element name="description" type="textarea" selector="#description"/>
<element name="newKeyword" type="input" selector="[data-ui-id='keyword']"/>
<element name="addNewKeyword" type="input" selector="[data-ui-id='add-keyword']"/>
<element name="cancel" type="button" selector="#image-details-action-cancel"/>
<element name="save" type="button" selector="#image-details-action-save"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="viewImageDetails"/>
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsEditActionGroup" stepKey="editImage"/>
<actionGroup ref="AdminMediaGalleryEditAssetAddKeywordActionGroup" stepKey="setKeywords">
<argument name="keyword" value="UpdatedImageDetails.keyword"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsSaveActionGroup" stepKey="saveImage">
<argument name="image" value="UpdatedImageDetails"/>
</actionGroup>
Expand All @@ -42,5 +45,11 @@
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageDescriptionActionGroup" stepKey="verifyImageDescription">
<argument name="description" value="UpdatedImageDetails.description"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyAddedKeywords">
<argument name="keywords" value="UpdatedImageDetails.keyword"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyMetadataKeywords">
<argument name="keywords" value="ImageMetadata.keywords"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>
<div class="admin__field admin__field-group-additional admin__field-small">
<div class="admin__field-control">
<button type="button" class="action-basic" data-bind="click: addKeyword">
<button type="button" data-ui-id="add-keyword" class="action-basic" data-bind="click: addKeyword">
<span data-bind="i18n: 'Add'"></span>
</button>
</div>
Expand Down

0 comments on commit daa221f

Please sign in to comment.