Skip to content

Commit

Permalink
#1703: The deleted tags are not removed from Tags drop-down until the…
Browse files Browse the repository at this point in the history
… web page is refreshed - added verify removal of keyword MFTF test
  • Loading branch information
yolouiese committed Aug 12, 2020
1 parent c4055cc commit 3b350fd
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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="AdminEnhancedMediaGalleryVerifyRemovedImageKeywordsActionGroup">
<annotations>
<description>Verifies removed image keywords on the View Details panel</description>
</annotations>
<arguments>
<argument name="keywords"/>
</arguments>

<grabTextFrom selector="{{AdminEnhancedMediaGalleryViewDetailsSection.keywords}}" stepKey="grabKeywords"/>
<assertStringNotContainsString stepKey="verifyKeywords">
<actualResult type="variable">grabKeywords</actualResult>
<expectedResult type="string">{{keywords}}</expectedResult>
</assertStringNotContainsString>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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="AdminMediaGalleryEditAssetRemoveKeywordActionGroup">
<annotations>
<description>Remove Keywords on the Edit Details panel</description>
</annotations>
<arguments>
<argument name="selectedKeywords"/>
</arguments>

<click selector="{{AdminEnhancedMediaGalleryEditDetailsSection.removeSelectedKeyword(selectedKeywords)}}" stepKey="removeKeyword"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<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="removeSelectedKeyword" type="button" selector="//span[contains(text(), '{{selectedKeywords}}')]/following-sibling::button[@data-action='remove-selected-item']" parameterized="true"/>
<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 @@ -38,8 +38,15 @@
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyAddedKeywords">
<argument name="keywords" value="UpdatedImageDetails.keyword"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyMetadataKeywords">
<argument name="keywords" value="ImageMetadata.keywords"/>
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsEditActionGroup" stepKey="updateImageDetails"/>
<actionGroup ref="AdminMediaGalleryEditAssetRemoveKeywordActionGroup" stepKey="removeKeywords">
<argument name="selectedKeywords" value="UpdatedImageDetails.keyword"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsSaveActionGroup" stepKey="saveUpdatedImage">
<argument name="image" value="UpdatedImageDetails"/>
</actionGroup>
<actionGroup ref="AdminEnhancedMediaGalleryVerifyRemovedImageKeywordsActionGroup" stepKey="verifyRemovedKeywords">
<argument name="keywords" value="UpdatedImageDetails.keyword"/>
</actionGroup>
</test>
</tests>

0 comments on commit 3b350fd

Please sign in to comment.