Skip to content

Commit

Permalink
adobe-stock-integration#1792: update after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Kopin committed Sep 8, 2020
1 parent b3e5989 commit 7f0a495
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/>
<actionGroup ref="AdminEnhancedMediaGalleryExpandCatalogTmpFolderActionGroup" stepKey="expandTmpFolder"/>
<actionGroup ref="AdminMediaGalleryFolderSelectByFullPathActionGroup" stepKey="selectCategoryFolder">
<argument name="name" value="catalog/tmp/category"/>
<argument name="path" value="catalog/tmp/category"/>
</actionGroup>

<!-- Asset folder is empty -->
<actionGroup ref="AdminAssertMediaGalleryEmptyFolderActionGroup" stepKey="assertEmptyFolder"/>
<!-- Assert folder is empty -->
<actionGroup ref="AdminAssertMediaGalleryEmptyActionGroup" stepKey="assertEmptyFolder"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
<element name="image" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Image')]/preceding-sibling::th) +1]//img[contains(@src, '{{file}}')]" parameterized="true"/>
<element name="columnValue" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{columnName}}')]/preceding-sibling::th) +1 ]//div" parameterized="true"/>
<element name="edit" type="button" selector="//tr[td//text()[contains(., '{{categoryName}}')]]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Action')]/preceding-sibling::th) +1 ]//*[text()='{{actionButton}}']" parameterized="true"/>
<element name="noDataMessage" type="text" selector="div.no-data-message-container"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminAssertMediaGalleryEmptyFolderActionGroup">
<actionGroup name="AdminAssertMediaGalleryEmptyActionGroup">
<annotations>
<description>Requires select folder in directory tree. Assert that selected folder is empty.</description>
</annotations>

<seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.noDataMessage}}" stepKey="assertNoDataMessageDisplayed" />
<seeElement selector="{{AdminMediaGalleryGridSection.noDataMessage}}" stepKey="assertNoDataMessageDisplayed" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminMediaGalleryFolderSelectByFullPathActionGroup"
extends="AdminMediaGalleryFolderSelectActionGroup">
<remove keyForRemoval="selectFolder"/>
<click selector="//li[@id='{{name}}']" stepKey="selectSubFolder" after="waitBeforeClickOnFolder"/>
<actionGroup name="AdminMediaGalleryFolderSelectByFullPathActionGroup">
<arguments>
<argument name="path" type="string"/>
</arguments>
<wait time="2" stepKey="waitBeforeClickOnFolder"/>
<click selector="//li[@id='{{path}}']" stepKey="selectSubFolder" after="waitBeforeClickOnFolder"/>
<waitForLoadingMaskToDisappear stepKey="waitForFolderContents"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<argument name="thirdImageFile" type="string"/>
</arguments>

<grabAttributeFrom selector="{{AdminEnhancedMediaGalleryGridImagePositionSection.nthImageInGrid('0')}}" userInput="src"
<grabAttributeFrom selector="{{AdminMediaGalleryGridSection.nthImageInGrid('0')}}" userInput="src"
stepKey="getFirstImageSrcAfterSort"/>
<grabAttributeFrom selector="{{AdminEnhancedMediaGalleryGridImagePositionSection.nthImageInGrid('1')}}" userInput="src"
<grabAttributeFrom selector="{{AdminMediaGalleryGridSection.nthImageInGrid('1')}}" userInput="src"
stepKey="getSecondImageSrcAfterSort"/>
<grabAttributeFrom selector="{{AdminEnhancedMediaGalleryGridImagePositionSection.nthImageInGrid('2')}}" userInput="src"
<grabAttributeFrom selector="{{AdminMediaGalleryGridSection.nthImageInGrid('2')}}" userInput="src"
stepKey="getThirdImageSrcAfterSort"/>

<assertStringContainsString stepKey="assertFirstImagePositionAfterSort">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminEnhancedMediaGalleryGridImagePositionSection">
<section name="AdminMediaGalleryGridSection">
<element name="noDataMessage" type="text" selector="div.no-data-message-container"/>
<element name="nthImageInGrid" type="text" selector="div[class='masonry-image-column'][data-repeat-index='{{row}}'] img" parameterized="true"/>
</section>
</sections>

0 comments on commit 7f0a495

Please sign in to comment.