Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 9754487

Browse files
author
Igor Melnikov
committed
MAGETWO-84901: Refactor product tests
- refactor
1 parent c1a4d89 commit 9754487

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<actionGroup name="createNewSimpleProduct">
12+
<amOnPage url="{{AdminProductIndexPage.url}}" mergeKey="navigateToProductIndex"/>
13+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" mergeKey="clickAddProductDropdown"/>
14+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" mergeKey="clickAddSimpleProduct"/>
15+
<fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" mergeKey="fillName"/>
16+
<fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" mergeKey="fillSKU"/>
17+
<fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" mergeKey="fillPrice"/>
18+
<fillField userInput="{{_defaultProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" mergeKey="fillQuantity"/>
19+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createPreReqCategory.name$$]" mergeKey="searchAndSelectCategory"/>
20+
<click selector="{{AdminProductSEOSection.sectionHeader}}" mergeKey="openSeoSection"/>
21+
<fillField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" mergeKey="fillUrlKey"/>
22+
<click selector="{{AdminProductFormActionSection.saveButton}}" mergeKey="saveProduct"/>
23+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" mergeKey="assertSaveMessageSuccess"/>
24+
<seeInField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" mergeKey="assertFieldName"/>
25+
<seeInField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" mergeKey="assertFieldSku"/>
26+
<seeInField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" mergeKey="assertFieldPrice"/>
27+
<click selector="{{AdminProductSEOSection.sectionHeader}}" mergeKey="openSeoSectionAssert"/>
28+
<seeInField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" mergeKey="assertFieldUrlKey"/>
29+
</actionGroup>
30+
</config>

0 commit comments

Comments
 (0)