|
| 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 | +<tests 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 | + <test name="AdminCreateSimpleProductDuplicateUrlkeyTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Product Creation Negative"/> |
| 14 | + <stories value="Error when try to save project with duplicate URL key"/> |
| 15 | + <title value="Error when try to save project with duplicate URL key."/> |
| 16 | + <description value="Error when try to save project with duplicate URL key."/> |
| 17 | + <severity value="NORMAL"/> |
| 18 | + <testCaseId value="MAGETWO-87586"/> |
| 19 | + <!--useCaseId value="USECASE-114"/--> |
| 20 | + <group value="product"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="SimpleTwo" stepKey="simpleProduct"> |
| 24 | + </createData> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 28 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 29 | + </after> |
| 30 | + |
| 31 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 32 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 33 | + <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/> |
| 34 | + <click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/> |
| 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"/> |
| 39 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> |
| 40 | + <fillField userInput="$$simpleProduct.custom_attributes[url_key]$$" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/> |
| 41 | + <click selector="{{AdminProductFormActionSection.saveButton}}" 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"/> |
| 43 | + </test> |
| 44 | +</tests> |
0 commit comments