Skip to content

Commit 01c8860

Browse files
committed
Updating the test
1 parent d3f202a commit 01c8860

File tree

4 files changed

+76
-5
lines changed

4 files changed

+76
-5
lines changed
Lines changed: 20 additions & 0 deletions
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillProductNameOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Name field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{productName}}" stepKey="fillProductName"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillProductQtyOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Quantity field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productQty" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{productQty}}" stepKey="fillProductQty"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillProductSkuOnProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in Sku field on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productSku" type="string"/>
17+
</arguments>
18+
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{productSku}}" stepKey="fillProductSku"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest/AdminCreateProductDuplicateUrlkeyTest.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,24 @@
3232
<actionGroup ref="AdminClickAddProductToggleAndSelectProductTypeActionGroup" stepKey="clickAddSimpleProduct">
3333
<argument name="productType" value="simple"/>
3434
</actionGroup>
35-
<fillField userInput="$$simpleProduct.name$$new" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
36-
<fillField userInput="$$simpleProduct.sku$$new" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
37-
<fillField userInput="$$simpleProduct.price$$" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
38-
<fillField userInput="$$simpleProduct.quantity$$" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
35+
<actionGroup ref="AdminFillProductNameOnProductFormActionGroup" stepKey="fillName">
36+
<argument name="productName" value="$$simpleProduct.name$$new"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminFillProductSkuOnProductFormActionGroup" stepKey="fillSKU">
39+
<argument name="productSku" value="$$simpleProduct.sku$$new"/>
40+
</actionGroup>
41+
<actionGroup ref="AdminFillProductPriceFieldAndPressEnterOnProductEditPageActionGroup" stepKey="fillPrice">
42+
<argument name="price" value="$$simpleProduct.price$$"/>
43+
</actionGroup>
44+
<actionGroup ref="AdminFillProductQtyOnProductFormActionGroup" stepKey="fillQuantity">
45+
<argument name="productQty" value="$$simpleProduct.quantity$$"/>
46+
</actionGroup>
3947
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
4048
<fillField userInput="$$simpleProduct.custom_attributes[url_key]$$" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
4149
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProduct"/>
42-
<see userInput="The value specified in the URL Key field would generate a URL that already exists" selector="{{AdminProductMessagesSection.errorMessage}}" stepKey="assertErrorMessage"/>
50+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertErrorMessage">
51+
<argument name="messageType" value="error"/>
52+
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists"/>
53+
</actionGroup>
4354
</test>
4455
</tests>

0 commit comments

Comments
 (0)