Skip to content

Commit

Permalink
ENGCOM-7960: #1667: [MFTF] Add a column with an edit link to the Cate…
Browse files Browse the repository at this point in the history
…gory grid - MFTF coverage #29393
  • Loading branch information
slavvka authored Aug 6, 2020
2 parents 49c6846 + 827c15d commit bb6474d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?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="AdminAssertCategoryPageTitleActionGroup">
<annotations>
<description>Assert's category page title for Simple Sub Category</description>
</annotations>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleSubCategory.name}}" stepKey="seeCategoryTitle"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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="AdminEditCategoryInGridPageActionGroup">
<annotations>
<description>Clicks the Edit action from the Media Gallery Category Grid</description>
</annotations>
<click selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.edit('2', 'Edit')}}" stepKey="clickOnCategoryRow"/>
<waitForPageLoad time="30" stepKey="waitForCategoryDetailsPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
<element name="name" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Name')]/preceding-sibling::th) +1 ]//*[text()='{{categoryName}}']" parameterized="true"/>
<element name="displayMode" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Display Mode')]/preceding-sibling::th) +1 ]//*[text()='{{productsText}}']" parameterized="true"/>
<element name="products" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Products')]/preceding-sibling::th) +1 ]//*[text()='{{productsQty}}']" parameterized="true"/>
</section>
<element name="edit" type="button" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Action')]/preceding-sibling::th) +1 ]//*[text()='{{edit}}']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminMediaGalleryCatalogUiEditCategoryGridPageTest">
<annotations>
<features value="AdminMediaGalleryCategoryGrid"/>
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1667"/>
<title value="User Edits Category from Category grid"/>
<stories value="Story 58: User sees entities where asset is used in" />
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/5034526"/>
<description value="Edit Category from Media Gallery Category Grid"/>
<severity value="CRITICAL"/>
<group value="media_gallery_ui"/>
</annotations>
<before>
<createData entity="SimpleSubCategory" stepKey="category"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<deleteData createDataKey="category" stepKey="deleteCategory"/>
</after>
<actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openCategoryPage"/>
<actionGroup ref="AdminEditCategoryInGridPageActionGroup" stepKey="editCategoryItem"/>
<actionGroup ref="AdminAssertCategoryPageTitleActionGroup" stepKey="assertCategoryByName"/>
</test>
</tests>

0 comments on commit bb6474d

Please sign in to comment.