Skip to content

Commit 3b350fd

Browse files
committed
#1703: The deleted tags are not removed from Tags drop-down until the web page is refreshed - added verify removal of keyword MFTF test
1 parent c4055cc commit 3b350fd

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminEnhancedMediaGalleryVerifyRemovedImageKeywordsActionGroup">
12+
<annotations>
13+
<description>Verifies removed image keywords on the View Details panel</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="keywords"/>
17+
</arguments>
18+
19+
<grabTextFrom selector="{{AdminEnhancedMediaGalleryViewDetailsSection.keywords}}" stepKey="grabKeywords"/>
20+
<assertStringNotContainsString stepKey="verifyKeywords">
21+
<actualResult type="variable">grabKeywords</actualResult>
22+
<expectedResult type="string">{{keywords}}</expectedResult>
23+
</assertStringNotContainsString>
24+
</actionGroup>
25+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminMediaGalleryEditAssetRemoveKeywordActionGroup">
12+
<annotations>
13+
<description>Remove Keywords on the Edit Details panel</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="selectedKeywords"/>
17+
</arguments>
18+
19+
<click selector="{{AdminEnhancedMediaGalleryEditDetailsSection.removeSelectedKeyword(selectedKeywords)}}" stepKey="removeKeyword"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryEditDetailsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<element name="description" type="textarea" selector="#description"/>
1515
<element name="newKeyword" type="input" selector="[data-ui-id='keyword']"/>
1616
<element name="addNewKeyword" type="input" selector="[data-ui-id='add-keyword']"/>
17+
<element name="removeSelectedKeyword" type="button" selector="//span[contains(text(), '{{selectedKeywords}}')]/following-sibling::button[@data-action='remove-selected-item']" parameterized="true"/>
1718
<element name="cancel" type="button" selector="#image-details-action-cancel"/>
1819
<element name="save" type="button" selector="#image-details-action-save"/>
1920
</section>

app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryVerifyUpdatedTagsTest.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@
3838
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyAddedKeywords">
3939
<argument name="keywords" value="UpdatedImageDetails.keyword"/>
4040
</actionGroup>
41-
<actionGroup ref="AdminEnhancedMediaGalleryVerifyImageKeywordsActionGroup" stepKey="verifyMetadataKeywords">
42-
<argument name="keywords" value="ImageMetadata.keywords"/>
41+
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsEditActionGroup" stepKey="updateImageDetails"/>
42+
<actionGroup ref="AdminMediaGalleryEditAssetRemoveKeywordActionGroup" stepKey="removeKeywords">
43+
<argument name="selectedKeywords" value="UpdatedImageDetails.keyword"/>
44+
</actionGroup>
45+
<actionGroup ref="AdminEnhancedMediaGalleryImageDetailsSaveActionGroup" stepKey="saveUpdatedImage">
46+
<argument name="image" value="UpdatedImageDetails"/>
47+
</actionGroup>
48+
<actionGroup ref="AdminEnhancedMediaGalleryVerifyRemovedImageKeywordsActionGroup" stepKey="verifyRemovedKeywords">
49+
<argument name="keywords" value="UpdatedImageDetails.keyword"/>
4350
</actionGroup>
4451
</test>
4552
</tests>

0 commit comments

Comments
 (0)