Skip to content

Commit b7252a2

Browse files
committed
MC-142: Guest customer should be able to advance search downloadable product with product name
MC-252: Guest customer should be able to advance search downloadable product with product sku MC-243: Guest customer should be able to advance search downloadable product with product description MC-245: Guest customer should be able to advance search downloadable product with product short description MC-246: Guest customer should be able to advance search downloadable product with product price - added mftf tests
1 parent c6134b0 commit b7252a2

File tree

7 files changed

+251
-0
lines changed

7 files changed

+251
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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="AdvanceCatalogSearchDownloadableByNameTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
12+
<annotations>
13+
<features value="CatalogSearch"/>
14+
<stories value="Advanced Catalog Product Search for all product types"/>
15+
<title value="Guest customer should be able to advance search Downloadable product with product name"/>
16+
<description value="Guest customer should be able to advance search Downloadable product with product name"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-142"/>
19+
<group value="CatalogSearch"/>
20+
</annotations>
21+
</test>
22+
<test name="AdvanceCatalogSearchDownloadableBySkuTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
23+
<annotations>
24+
<features value="CatalogSearch"/>
25+
<stories value="Advanced Catalog Product Search for all product types"/>
26+
<title value="Guest customer should be able to advance search Downloadable product with product sku"/>
27+
<description value="Guest customer should be able to advance search Downloadable product with product sku"/>
28+
<severity value="MAJOR"/>
29+
<testCaseId value="MC-252"/>
30+
<group value="CatalogSearch"/>
31+
</annotations>
32+
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search">
33+
<argument name="sku" value="$$createProductOne.sku$$"/>
34+
</actionGroup>
35+
</test>
36+
<test name="AdvanceCatalogSearchDownloadableByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
37+
<annotations>
38+
<features value="CatalogSearch"/>
39+
<stories value="Advanced Catalog Product Search for all product types"/>
40+
<title value="Guest customer should be able to advance search Downloadable product with product description"/>
41+
<description value="Guest customer should be able to advance search Downloadable product with product description"/>
42+
<severity value="MAJOR"/>
43+
<testCaseId value="MC-243"/>
44+
<group value="CatalogSearch"/>
45+
</annotations>
46+
<actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search">
47+
<argument name="description" value="$$createProductOne.custom_attributes[description]$$"/>
48+
</actionGroup>
49+
</test>
50+
<test name="AdvanceCatalogSearchDownloadableByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
51+
<annotations>
52+
<features value="CatalogSearch"/>
53+
<stories value="Advanced Catalog Product Search for all product types"/>
54+
<title value="Guest customer should be able to advance search Downloadable product with product short description"/>
55+
<description value="Guest customer should be able to advance search Downloadable product with product short description"/>
56+
<severity value="MAJOR"/>
57+
<testCaseId value="MC-245"/>
58+
<group value="CatalogSearch"/>
59+
</annotations>
60+
<actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search">
61+
<argument name="shortDescription" value="$$createProductOne.custom_attributes[short_description]$$"/>
62+
</actionGroup>
63+
</test>
64+
<test name="AdvanceCatalogSearchDownloadableByPriceTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
65+
<annotations>
66+
<features value="CatalogSearch"/>
67+
<stories value="Advanced Catalog Product Search for all product types"/>
68+
<title value="Guest customer should be able to advance search Downloadable product with product price"/>
69+
<description value="Guest customer should be able to advance search Downloadable product with product price"/>
70+
<severity value="MAJOR"/>
71+
<testCaseId value="MC-246"/>
72+
<group value="CatalogSearch"/>
73+
</annotations>
74+
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search">
75+
<argument name="name" value="$$createProductOne.name$$"/>
76+
<argument name="priceFrom" value="$$createProductOne.price$$"/>
77+
<argument name="priceTo" value="$$createProductOne.price$$"/>
78+
</actionGroup>
79+
</test>
80+
</tests>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/LinkData.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,13 @@
4141
<data key="file_type">URL</data>
4242
<data key="file">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
4343
</entity>
44+
<entity name="ApiDownloadableLink" type="downloadable_link">
45+
<data key="title" unique="suffix">Api Downloadable Link</data>
46+
<data key="price">2.00</data>
47+
<data key="link_type">url</data>
48+
<data key="shareable">No</data>
49+
<data key="number_of_downloads">1000</data>
50+
<data key="sort_order">0</data>
51+
<data key="link_file">https://static.magento.com/sites/all/themes/mag_redesign/images/magento-logo.svg</data>
52+
</entity>
4453
</entities>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Downloadable/Data/ProductData.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,19 @@
1919
<data key="status">1</data>
2020
<data key="urlKey" unique="suffix">downloadableproduct</data>
2121
</entity>
22+
<entity name="ApiDownloadableProduct" type="product">
23+
<data key="sku" unique="suffix">api-downloadable-product</data>
24+
<data key="type_id">downloadable</data>
25+
<data key="attribute_set_id">4</data>
26+
<data key="visibility">4</data>
27+
<data key="name" unique="suffix">Api Downloadable Product</data>
28+
<data key="price">123.00</data>
29+
<data key="urlKey" unique="suffix">api-downloadable-product</data>
30+
<data key="status">1</data>
31+
<data key="quantity">100</data>
32+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
33+
<requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity>
34+
<requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity>
35+
<requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity>
36+
</entity>
2237
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateDownloadableLink" dataType="downloadable_link" type="create" auth="adminOauth" url="/V1/products/{sku}/downloadable-links" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="downloadable_link" key="link">
14+
<field key="title">string</field>
15+
<field key="sort_order">integer</field>
16+
<field key="is_shareable">integer</field>
17+
<field key="price">number</field>
18+
<field key="number_of_downloads">integer</field>
19+
<field key="link_type">string</field>
20+
<field key="link_file">string</field>
21+
<field key="link_file_content">link_file_content</field>
22+
<field key="file_data">string</field>
23+
<field key="link_url">string</field>
24+
<field key="sample_type">string</field>
25+
<field key="sample_file">string</field>
26+
<field key="sample_file_content">sample_file_content</field>
27+
<field key="sample_url">string</field>
28+
</object>
29+
<field key="isGlobalScopeContent">boolean</field>
30+
</operation>
31+
</operations>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateLinkFileContent" dataType="link_file_content" type="create">
12+
<field key="file_data">string</field>
13+
<field key="name">string</field>
14+
</operation>
15+
</operations>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateSampleFileContent" dataType="sample_file_content" type="create">
12+
<field key="file_data">string</field>
13+
<field key="name">string</field>
14+
</operation>
15+
</operations>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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="AdvanceCatalogSearchDownloadableByNameTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
12+
<annotations>
13+
<group value="Catalog"/>
14+
</annotations>
15+
<before>
16+
<createData entity="ApiDownloadableProduct" stepKey="createProductOne"/>
17+
<!-- Uncomment after bug MQE-1023 is fixed -->
18+
<!--createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
19+
<requiredEntity createDataKey="createProductOne"/>
20+
</createData>
21+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
22+
<requiredEntity createDataKey="createProductOne"/>
23+
</createData-->
24+
</before>
25+
</test>
26+
<test name="AdvanceCatalogSearchDownloadableBySkuTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
27+
<annotations>
28+
<group value="Catalog"/>
29+
</annotations>
30+
<before>
31+
<createData entity="ApiDownloadableProduct" stepKey="createProductOne"/>
32+
<!-- Uncomment after bug MQE-1023 is fixed -->
33+
<!--createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
34+
<requiredEntity createDataKey="createProductOne"/>
35+
</createData>
36+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
37+
<requiredEntity createDataKey="createProductOne"/>
38+
</createData-->
39+
</before>
40+
</test>
41+
<test name="AdvanceCatalogSearchDownloadableByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
42+
<annotations>
43+
<group value="Catalog"/>
44+
</annotations>
45+
<before>
46+
<createData entity="ApiDownloadableProduct" stepKey="createProductOne"/>
47+
<!-- Uncomment after bug MQE-1023 is fixed -->
48+
<!--createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
49+
<requiredEntity createDataKey="createProductOne"/>
50+
</createData>
51+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
52+
<requiredEntity createDataKey="createProductOne"/>
53+
</createData-->
54+
</before>
55+
</test>
56+
<test name="AdvanceCatalogSearchDownloadableByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
57+
<annotations>
58+
<group value="Catalog"/>
59+
</annotations>
60+
<before>
61+
<createData entity="ApiDownloadableProduct" stepKey="createProductOne"/>
62+
<!-- Uncomment after bug MQE-1023 is fixed -->
63+
<!--createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
64+
<requiredEntity createDataKey="createProductOne"/>
65+
</createData>
66+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
67+
<requiredEntity createDataKey="createProductOne"/>
68+
</createData-->
69+
</before>
70+
</test>
71+
<test name="AdvanceCatalogSearchDownloadableByPriceTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
72+
<annotations>
73+
<group value="Catalog"/>
74+
</annotations>
75+
<before>
76+
<createData entity="ApiDownloadableProduct" stepKey="createProductOne"/>
77+
<!-- Uncomment after bug MQE-1023 is fixed -->
78+
<!--createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1">
79+
<requiredEntity createDataKey="createProductOne"/>
80+
</createData>
81+
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2">
82+
<requiredEntity createDataKey="createProductOne"/>
83+
</createData-->
84+
</before>
85+
</test>
86+
</tests>

0 commit comments

Comments
 (0)