Skip to content

Commit a016b2a

Browse files
Sahil.kumarSahil.kumar
authored andcommitted
Added all actions in CE
1 parent fa3d6ec commit a016b2a

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="AddProductImageActionGroup">
12+
<annotations>
13+
<description>Adds the provided Product Image on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="image" defaultValue="ProductImage"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="waitForImagesSection"/>
20+
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesSection"/>
21+
<waitForPageLoad stepKey="waitForPageRefresh"/>
22+
<waitForElementVisible selector="{{AdminProductImagesSection.imageUploadButton}}" stepKey="seeImageSectionIsReady"/>
23+
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="{{image.file}}" stepKey="uploadFile"/>
24+
<waitForPageLoad stepKey="waitForImageUpload"/>
25+
<waitForElementNotVisible selector="{{AdminProductImagesSection.uploadProgressBar}}" stepKey="waitForUpload"/>
26+
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="waitForThumbnail"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@
1111
<section name="AdminCategoryProductsSection">
1212
<element name="sectionHeader" type="button" selector="div[data-index='assign_products'] .fieldset-wrapper-title" timeout="30"/>
1313
<element name="sectionBody" type="button" selector="div[data-index='assign_products'] .admin__fieldset-wrapper-content" timeout="30"/>
14+
<element name="addProducts" type="button" selector="//button[@class='action-default scalable secondary add-products']"/>
15+
<element name="filtersButton" type="button" selector="//div[@class='data-grid-filters-actions-wrap']//button"/>
16+
<element name="clearAllButton" type="button" selector="//button[contains(text(),'Clear all')]"/>
17+
<element name="downArrow" type="button" selector="//button[@class='action-multicheck-toggle']"/>
18+
<element name="selectAllOnThisPage" type="select" selector="//span[contains(text(),'Select All on This Page')]"/>
19+
<element name="saveAndClose" type="button" selector="//button[@name='add_products_save_button']"/>
20+
<element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/>
21+
<element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/>
1422
</section>
1523
</sections>

0 commit comments

Comments
 (0)