|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminCannotCreateSimpleProductWithEmptySKUTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Admin should not be able to create a product with SKU empty"/> |
| 14 | + <title value="Admin should not be able to create a product with SKU empty"/> |
| 15 | + <description value="Admin should not be able to create a product with SKU empty"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <testCaseId value="AC-6020"/> |
| 18 | + <group value="product"/> |
| 19 | + <group value="pr_exclude"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> |
| 24 | + <argument name="ProductAttribute" value="sku"/> |
| 25 | + </actionGroup> |
| 26 | + <selectOption userInput="0" selector="#is_required" stepKey="selectOptionNo"/> |
| 27 | + <click stepKey="saveAttribute" selector="#save" /> |
| 28 | + <waitForPageLoad stepKey="waitForSaveAttribute"/> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> |
| 32 | + <argument name="ProductAttribute" value="sku"/> |
| 33 | + </actionGroup> |
| 34 | + <selectOption userInput="1" selector="#is_required" stepKey="selectOptionYes"/> |
| 35 | + <click stepKey="saveAttribute" selector="#save" /> |
| 36 | + <waitForPageLoad stepKey="waitForSaveAttribute" /> |
| 37 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 38 | + </after> |
| 39 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateProduct"/> |
| 40 | + <waitForPageLoad stepKey="waitForAdminOpenNewProductFormPageActionGroup" /> |
| 41 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait1"/> |
| 42 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillName"/> |
| 43 | + <actionGroup ref="FillMainProductFormByStringActionGroup" stepKey="fillSKU"> |
| 44 | + <argument name="productName" value="{{SimpleProduct.name}}"/> |
| 45 | + <argument name="productSku" value=""/> |
| 46 | + <argument name="productPrice" value="100"/> |
| 47 | + <argument name="productQuantity" value="{{SimpleProduct.quantity}}"/> |
| 48 | + <argument name="productStatus" value="{{SimpleProduct.status}}"/> |
| 49 | + <argument name="productWeight" value="{{SimpleProduct.weight}}"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSave"/> |
| 52 | + <waitForPageLoad stepKey="waitForAdminProductFormSaveActionGroup"/> |
| 53 | + <see selector="The "sku" attribute value is empty." stepKey="seeErrorMessage"/> |
| 54 | + </test> |
| 55 | +</tests> |
0 commit comments