Skip to content

Commit 0876028

Browse files
committed
MAGETWO-87775: Automate MFTF tests
- Added tests to create pagebuilder product attribute from product form
1 parent 8431c89 commit 0876028

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="navigateToCreatedProductAttribute">
12+
<arguments>
13+
<argument name="ProductAttribute"/>
14+
</arguments>
15+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1"/>
17+
<click selector="{{AdminProductAttributeGridSection.AttributeCode(ProductAttribute.attribute_code)}}" stepKey="navigateToAttributeEditPage1" />
18+
<waitForPageLoad stepKey="waitForPageLoad2" />
19+
</actionGroup>
20+
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCreateProductAttributeSection.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<element name="SaveAndEdit" type="button" selector="#save_and_edit_button"/>
1919
<element name="TinyMCE4" type="button" selector="//span[text()='Default Value']/parent::label/following-sibling::div//div[@class='mce-branding-powered-by']"/>
2020
<element name="checkIfTabOpen" selector="//div[@id='advanced_fieldset-wrapper' and not(contains(@class,'opened'))]" type="button"/>
21-
<element name="SaveAndEdit" selector="#save_and_edit_button" type="button"/>
2221
</section>
2322
<section name="StorefrontPropertiesSection">
2423
<element name="StoreFrontPropertiesTab" selector="#product_attribute_tabs_front" type="button"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<element name="fieldError" type="text" selector="//input[@name='product[{{fieldName}}]']/following-sibling::label[@class='admin__field-error']" parameterized="true"/>
2121
<element name="priceFieldError" type="text" selector="//input[@name='product[price]']/parent::div/parent::div/label[@class='admin__field-error']"/>
2222
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
23+
<element name="createNewAttributeBtn" type="button" selector="button[data-index='add_new_attribute_button']"/>
24+
<element name="save" type="button" selector="#save"/>
25+
<element name="attributeTab" type="button" selector="//strong[@class='admin__collapsible-title']/span[text()='Attributes']"/>
26+
<element name="attributeLabel" type="input" selector="//input[@name='frontend_label[0]']"/>
27+
<element name="frontendInput" type="select" selector="select[name = 'frontend_input']"/>
2328
</section>
2429
<section name="ProductWYSIWYGSection">
2530
<element name="Switcher" type="button" selector="//select[@id='dropdown-switcher']"/>

0 commit comments

Comments
 (0)