|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontBundleCheckBoxOptionValidationTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Bundle"/> |
| 14 | + <stories value="Bundle product validation before add to cart"/> |
| 15 | + <title value="Customer should be able to see only one validation message for checkbox option group"/> |
| 16 | + <description value="Customer should be able to see only one validation message for checkbox option group"/> |
| 17 | + <severity value="MINOR"/> |
| 18 | + <group value="Bundle"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <createData entity="ApiProductWithDescription" stepKey="simpleProduct1" before="bundleProduct"/> |
| 22 | + <createData entity="ApiProductWithDescription" stepKey="simpleProduct2" after="simpleProduct1"/> |
| 23 | + <createData entity="ApiBundleProduct" stepKey="bundleProduct"/> |
| 24 | + <createData entity="CheckboxOption" stepKey="checkboxBundleOption"> |
| 25 | + <requiredEntity createDataKey="bundleProduct"/> |
| 26 | + </createData> |
| 27 | + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> |
| 28 | + <requiredEntity createDataKey="bundleProduct"/> |
| 29 | + <requiredEntity createDataKey="checkboxBundleOption"/> |
| 30 | + <requiredEntity createDataKey="simpleProduct1"/> |
| 31 | + <field key="qty">2</field> |
| 32 | + </createData> |
| 33 | + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> |
| 34 | + <requiredEntity createDataKey="bundleProduct"/> |
| 35 | + <requiredEntity createDataKey="checkboxBundleOption"/> |
| 36 | + <requiredEntity createDataKey="simpleProduct2"/> |
| 37 | + <field key="qty">4</field> |
| 38 | + </createData> |
| 39 | + <magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/> |
| 40 | + </before> |
| 41 | + <after> |
| 42 | + <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/> |
| 43 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> |
| 44 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> |
| 45 | + </after> |
| 46 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront"> |
| 47 | + <argument name="productUrl" value="$$bundleProduct.custom_attributes[url_key]$$"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="customizeBundleProduct"/> |
| 50 | + <actionGroup ref="StorefrontAddToTheCartButtonActionGroup" stepKey="addToCartBundleProduct"/> |
| 51 | + <actionGroup ref="AssertStorefrontBundleValidationCountActionGroup" stepKey="assertBundleValidationCount"/> |
| 52 | + <actionGroup ref="AssertStorefrontBundleValidationMessageActionGroup" stepKey="assertBundleValidationMessage"> |
| 53 | + <argument name="message" value="Please select one of the options."/> |
| 54 | + </actionGroup> |
| 55 | + </test> |
| 56 | +</tests> |
0 commit comments