Skip to content

Commit e91e713

Browse files
committed
MAGETWO-92425: Create/Update Automated Tests
- Update tests to handle cleaning up uploaded images better - Fix additional usages of background-position to use visual select
1 parent e230539 commit e91e713

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/DeleteImageFromStorageActionGroup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
<arguments>
1212
<argument name="Image"/>
1313
</arguments>
14-
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.value, Image.fileName, Image.extension)}}" stepKey="initialImages"/>
15-
<click selector="{{MediaGallerySection.imageOrImageCopy(Image.value, Image.fileName, Image.extension)}}" stepKey="selectImage"/>
14+
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="initialImages"/>
15+
<click selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="selectImage"/>
1616
<waitForElementVisible selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="waitForDeleteBtn"/>
1717
<click selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="clickDeleteSelected"/>
1818
<waitForPageLoad stepKey="waitForPageLoad1"/>
1919
<waitForElementVisible selector="{{MediaGallerySection.confirmDelete}}" stepKey="waitForConfirmBtn"/>
2020
<click selector="{{MediaGallerySection.confirmDelete}}" stepKey="clickConfirmBtn"/>
2121
<waitForPageLoad stepKey="waitForPageLoad2"/>
2222
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
23-
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.value, Image.fileName, Image.extension)}}" stepKey="newImages"/>
23+
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="newImages"/>
2424
<assertLessThan stepKey="assertLessImages">
2525
<expectedResult type="variable">initialImages</expectedResult>
2626
<actualResult type="variable">newImages</actualResult>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/SelectImageFromMediaStorageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{Image.value}}" stepKey="uploadImage"/>
4343
<waitForPageLoad stepKey="waitForPageLoad"/>
4444
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
45-
<waitForElementVisible selector="{{MediaGallerySection.imageOrImageCopy(Image.value, Image.fileName, Image.extension)}}" stepKey="waitForUploadImage"/>
45+
<waitForElementVisible selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="waitForUploadImage"/>
4646
</actionGroup>
4747
<actionGroup name="deleteImage">
4848
<see selector="{{MediaGallerySection.DeleteSelectedBtn}}" userInput="Delete Selected" stepKey="seeDeleteBtn"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/TinyMCESection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<element name="Browse" type="button" selector=".mce-i-browse"/>
3737
<element name="BrowseUploadImage" type="file" selector=".fileupload" />
3838
<element name="image" type="text" selector="//small[text()='{{var1}}']" parameterized="true"/>
39-
<element name="imageOrImageCopy" type="text" selector="//img[contains(@alt, '{{arg1}}')]|//img[contains(@alt,'{{arg2}}_') and contains(@alt,'.{{arg3}}')]" parameterized="true"/>
39+
<element name="imageOrImageCopy" type="text" selector="//img[contains(@alt, '{{arg1}}.{{arg2}}')]|//img[contains(@alt,'{{arg1}}_') and contains(@alt,'.{{arg2}}')]" parameterized="true"/>
4040
<element name="imageSelected" type="text" selector="//small[text()='{{var1}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
4141
<element name="ImageSource" type="input" selector=".mce-combobox.mce-abs-layout-item.mce-last.mce-has-open" />
4242
<element name="ImageDescription" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-last" />

0 commit comments

Comments
 (0)