Skip to content

Commit a792ef6

Browse files
committed
[ACQE-7331] [ACPT-820] [TEST] Two imports from admin in parallel
new testcase added.
1 parent 5184c06 commit a792ef6

File tree

6 files changed

+164
-2
lines changed

6 files changed

+164
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminImportButtonClickActionGroup">
12+
<annotations>
13+
<description>In the Admin Import page. Imports the provided File. Validates that the Success Message is present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="importNoticeMessage" type="string" defaultValue="" />
17+
<argument name="importMessageType" type="string" defaultValue="success" />
18+
<argument name="importMessage" type="string" defaultValue="Import successfully done" />
19+
</arguments>
20+
<waitForElementVisible selector="{{AdminImportMainSection.importButton}}" stepKey="waitForImportButtonElementVisible" />
21+
<click selector="{{AdminImportMainSection.importButton}}" stepKey="clickImportButton" />
22+
<waitForElementVisible selector="{{AdminImportValidationMessagesSection.notice}}" stepKey="waitForNoticeMessage" />
23+
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="{{importNoticeMessage}}" stepKey="seeNoticeMessage" />
24+
<see selector="{{AdminImportValidationMessagesSection.messageByType(importMessageType)}}" userInput="{{importMessage}}" stepKey="seeImportMessage" />
25+
</actionGroup>
26+
</actionGroups>
27+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminImportDataCheckActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Import page, uploads the provided file, and clicks on the Check Data button. Validates that the notice message is present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="behavior" type="string"/>
17+
<argument name="validationStrategy" type="string" defaultValue="Stop on Error"/>
18+
<argument name="allowedErrorsCount" type="string" defaultValue="10"/>
19+
<argument name="importFile" type="string"/>
20+
<argument name="importValidationMessage" type="string" defaultValue=""/>
21+
</arguments>
22+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/>
23+
<waitForPageLoad stepKey="adminImportMainSectionLoad"/>
24+
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
25+
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/>
26+
<selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="{{behavior}}" stepKey="selectImportBehaviorOption"/>
27+
<selectOption selector="{{AdminImportMainSection.validationStrategy}}" userInput="{{validationStrategy}}" stepKey="selectValidationStrategyOption"/>
28+
<fillField selector="{{AdminImportMainSection.allowedErrorsCount}}" userInput="{{allowedErrorsCount}}" stepKey="fillAllowedErrorsCountField"/>
29+
<attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="{{importFile}}" stepKey="attachFileForImport"/>
30+
<click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/>
31+
<see selector="{{AdminImportValidationMessagesSection.validationNotice}}" userInput="{{importValidationMessage}}" stepKey="seeValidationMessage"/>
32+
<waitForElementVisible selector="{{AdminImportMainSection.importButton}}" stepKey="waitForImportButtonElementVisible"/>
33+
</actionGroup>
34+
</actionGroups>

app/code/Magento/ImportExport/Test/Mftf/Section/AdminImportValidationMessagesSection.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminImportValidationMessagesSection">
1212
<element name="notice" type="text" selector="#import_validation_messages .message-notice"/>
13+
<element name="validationNotice" type="text" selector="//div[@id='import_validation_messages']//div[@class='message message-notice notice']"/>
1314
<element name="success" type="text" selector="#import_validation_messages .message-success"/>
1415
<element name="messageByType" type="text" selector="#import_validation_messages .message-{{messageType}}" parameterized="true" />
1516
<element name="importErrorList" type="text" selector="#import_validation_messages .import-error-list"/>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminTwoImportProductsParallelTest">
12+
<annotations>
13+
<features value="Import/Export"/>
14+
<stories value="Import Products"/>
15+
<title value="Verify Two imports from admin in parallel."/>
16+
<description value="Two imports from admin in parallel."/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-7463"/>
19+
<group value="importExport"/>
20+
</annotations>
21+
<before>
22+
<!-- Login as Admin -->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<!-- Delete all imported products -->
27+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/>
28+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilter"/>
29+
<actionGroup ref="AdminDataGridSelectPerPageActionGroup" stepKey="selectNumberOfProductsPerPage">
30+
<argument name="perPage" value="100"/>
31+
</actionGroup>
32+
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/>
33+
<!-- Logout from Admin -->
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
35+
</after>
36+
<!-- Navigate to the Import page in the admin panel -->
37+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/>
38+
<!-- Set import settings: Entity Type > Product, Import Behavior > Add/Update,
39+
Select File to Import > press "Check Data" and Validate Message -->
40+
<actionGroup ref="AdminImportDataCheckActionGroup" stepKey="adminImportButtonVisible">
41+
<argument name="behavior" value="Add/Update"/>
42+
<argument name="importFile" value="ACPT-846.1.csv"/>
43+
<argument name="importValidationMessage" value="Checked rows: 15, checked entities: 15, invalid rows: 0, total errors: 0"/>
44+
</actionGroup>
45+
<!-- Open a new tab and navigate to the Import page -->
46+
<openNewTab stepKey="openNewTab"/>
47+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage1"/>
48+
<!-- In New Tab Set import settings: Entity Type > Product, Import Behavior > Add/Update,
49+
Select File to Import > press "Check Data" and Validate Message -->
50+
<actionGroup ref="AdminImportDataCheckActionGroup" stepKey="adminImportButtonVisibleForNewTab">
51+
<argument name="behavior" value="Add/Update"/>
52+
<argument name="importFile" value="ACPT-846.2.csv"/>
53+
<argument name="importValidationMessage" value="Checked rows: 15, checked entities: 15, invalid rows: 0, total errors: 0"/>
54+
</actionGroup>
55+
<!-- Switch back to the previous tab -->
56+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
57+
<!-- Click On Import Button and Validate Message -->
58+
<actionGroup ref="AdminImportButtonClickActionGroup" stepKey="ImportButtonClick">
59+
<argument name="importNoticeMessage" value="Created: 15, Updated: 0, Deleted: 0"/>
60+
</actionGroup>
61+
<!-- Switch to the next tab -->
62+
<switchToNextTab stepKey="switchToNextTab"/>
63+
<!-- Click On Import Button and Validate Message -->
64+
<actionGroup ref="AdminImportButtonClickActionGroup" stepKey="ImportButtonClickInNextTab">
65+
<argument name="importNoticeMessage" value="Created: 15, Updated: 0, Deleted: 0"/>
66+
</actionGroup>
67+
</test>
68+
</tests>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,deferred_stock_update,use_config_deferred_stock_update,related_skus,related_position,crosssell_skus,crosssell_position,upsell_skus,upsell_position,additional_images,additional_image_labels,hide_from_product_page,custom_options,giftcard_type,giftcard_allow_open_amount,giftcard_open_amount_min,giftcard_open_amount_max,giftcard_amount,use_config_is_redeemable,giftcard_is_redeemable,use_config_lifetime,giftcard_lifetime,use_config_allow_message,giftcard_allow_message,use_config_email_template,giftcard_email_template,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,bundle_shipment_type,downloadable_links,downloadable_samples,associated_skus,configurable_variations,configurable_variation_labels
2+
shirt1,,Default,simple,"Default Category,Default Category/subcat",base,shirt1,,,,1,"Taxable Goods","Catalog, Search",4.500000,,,,shirt1-space6,shirt1-space6,shirt1,"shirt1 ",,,,,,,,,"6/15/22, 1:17 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3+
shirt2,,Default,simple,"Default Category,Default Category/subcat",base,shirt2,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,shirt2-space6,shirt2-space6,shirt2,"shirt2 ",,,,,,,,,"6/15/22, 1:26 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4+
shirt3,,Default,simple,"Default Category,Default Category/subcat",base,shirt3,,,,1,"Taxable Goods","Catalog, Search",125.000000,,,,shirt3,shirt3,shirt3,"shirt3 ",,,,,,,,,"6/20/22, 9:23 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",124.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,1,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5+
green1,,Default,simple,"Default Category,Default Category/subcat",base,green1,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green1,green1,green1,"green1 ",,,,,,,,,"6/20/22, 2:28 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6+
green2,,Default,simple,"Default Category,Default Category/subcat",base,green2,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green2,green2,green2,"green2 ",,,,,,,,,"6/20/22, 2:36 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7+
green3,,Default,simple,"Default Category,Default Category/subcat",base,green3,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green3,green3,green3,"green3 ",,,,,,,,,"6/20/22, 2:38 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8+
green4,,Default,simple,"Default Category,Default Category/subcat",base,green4,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green4,green4,green4,"green4 ",,,,,,,,,"6/20/22, 2:50 PM","6/29/22, 5:10 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
9+
green40,,Default,simple,"Default Category,Default Category/subcat",base,green40,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green40,green40,green40,"green40 ",,,,,,,,,"6/23/22, 7:34 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10+
green41,,Default,simple,"Default Category,Default Category/subcat",base,green41,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green41,green41,green41,"green41 ",,,,,,,,,"6/23/22, 7:48 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11+
green43,,Default,simple,"Default Category,Default Category/subcat",base,green43,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green43,green43,green43,"green43 ",,,,,,,,,"6/23/22, 8:59 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12+
green44,,Default,simple,"Default Category,Default Category/subcat",base,green44,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green44,green44,green44,"green44 ",,,,,,,,,"6/23/22, 9:15 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13+
green45,,Default,simple,"Default Category,Default Category/subcat",base,green45,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green45,green45,green45,"green45 ",,,,,,,,,"6/23/22, 9:18 AM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
14+
megaman1,,Default,simple,"Default Category,Default Category/subcat",base,megaman1,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,megaman1,megaman1,megaman1,"megaman1 ",,,,,,,,,"6/23/22, 1:48 PM","6/23/22, 1:48 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,0,0,0,0,0.0000,0,0.0000,0,0,,0,0,0,0,0.0000,0,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15+
green5,,Default,simple,"Default Category,Default Category/subcat",base,green5,,,,1,"Taxable Goods","Catalog, Search",3.000000,,,,green5,green5,green5,"green5 ",,,,,,,,,"6/29/22, 6:07 PM","6/29/22, 6:07 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16+
blue1,,Default,simple,"Default Category,Default Category/subcat",base,blue1,,,,1,"Taxable Goods","Catalog, Search",2.000000,,,,blue1-space1,blue1-space2,blue1,"blue1 ",,,,,,,,,"6/30/22, 11:15 AM","6/30/22, 6:50 PM",,,"Block after Info Column",,,,"Use config",,,,,,,"Use config",,"gift_wrapping_available=Use config",0.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,0,1.0000,1,1,1,1,1.0000,1,0,0,0,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

0 commit comments

Comments
 (0)