Skip to content

Commit d9d4b82

Browse files
authored
Merge pull request #4795 from magento-tsg/2.3-develop-pr67
[TSG] Fixes for 2.3 (pr67) (2.3-develop)
2 parents 9b2cefd + d41ed94 commit d9d4b82

25 files changed

+300
-50
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@
134134
<scrollToTopOfPage stepKey="scrollTopPageProduct"/>
135135
<waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveProductButton"/>
136136
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
137-
<waitForPageLoad stepKey="waitForProductToSave"/>
138-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
137+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitProductSaveSuccessMessage"/>
138+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
139139
</actionGroup>
140140

141141
<actionGroup name="toggleProductEnabled">
@@ -149,9 +149,10 @@
149149
<!-- Save product but do not expect a success message -->
150150
<actionGroup name="SaveProductFormNoSuccessCheck" extends="saveProductForm">
151151
<annotations>
152-
<description>EXTENDS: saveProductForm. Removes 'seeSaveConfirmation'.</description>
152+
<description>EXTENDS: saveProductForm. Removes 'waitProductSaveSuccessMessage' and 'seeSaveConfirmation'.</description>
153153
</annotations>
154154

155+
<remove keyForRemoval="waitProductSaveSuccessMessage"/>
155156
<remove keyForRemoval="seeSaveConfirmation"/>
156157
</actionGroup>
157158

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,4 +423,23 @@
423423
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmProductDelete"/>
424424
<waitForPageLoad stepKey="waitForGridLoad"/>
425425
</actionGroup>
426+
427+
<actionGroup name="deleteAllProductsUsingProductGrid">
428+
<annotations>
429+
<description>Deletes all products in Admin Products grid page.</description>
430+
</annotations>
431+
432+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="openAdminGridProductsPage"/>
433+
<waitForPageLoad time="60" stepKey="waitForPageFullyLoad"/>
434+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clearGridFilters"/>
435+
436+
<conditionalClick selector="{{AdminProductGridSection.multicheckDropdown}}" dependentSelector="{{AdminDataGridTableSection.dataGridEmpty}}" visible="false" stepKey="openMulticheckDropdown"/>
437+
<conditionalClick selector="{{AdminProductGridSection.multicheckOption('Select All')}}" dependentSelector="{{AdminDataGridTableSection.dataGridEmpty}}" visible="false" stepKey="selectAllProductsInGrid"/>
438+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
439+
<click selector="{{AdminProductGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/>
440+
441+
<waitForElementVisible selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForConfirmModal"/>
442+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/>
443+
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitGridIsEmpty"/>
444+
</actionGroup>
426445
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Page/AdminProductCreatePage.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<section name="AdminProductAttributesSection"/>
1919
<section name="AdminProductFormRelatedUpSellCrossSellSection"/>
2020
<section name="AdminProductFormAdvancedPricingSection"/>
21-
<section name="AdminProductFormAdvancedInventorySection"/>
2221
<section name="AdminAddAttributeModalSection"/>
2322
</page>
2423
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCatalogInventoryConfigurationMaxQtyAllowedInShoppingCartValidationActionGroup">
12+
<arguments>
13+
<argument name="qty" type="string"/>
14+
<argument name="errorMessage" type="string"/>
15+
</arguments>
16+
17+
<fillField selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQty}}" userInput="{{qty}}" stepKey="setMaxSaleQtyValue"/>
18+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/>
19+
<waitForElementVisible selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" stepKey="waitValidationErrorMessageAppears"/>
20+
<see selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" userInput="{{errorMessage}}" stepKey="checkValidationErrorMessage"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 31 additions & 0 deletions
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminProductSetMaxQtyAllowedInShoppingCart">
12+
<arguments>
13+
<argument name="qty" type="string"/>
14+
</arguments>
15+
<conditionalClick selector="{{AdminProductFormSection.advancedInventoryLink}}" dependentSelector="{{AdminProductFormAdvancedInventorySection.advancedInventoryModal}}" visible="false" stepKey="clickOnAdvancedInventoryLinkIfNeeded"/>
16+
<waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.maxiQtyConfigSetting}}" stepKey="waitForAdvancedInventoryModalWindowOpen"/>
17+
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.maxiQtyConfigSetting}}" stepKey="uncheckMaxQtyCheckBox"/>
18+
<fillField selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCart}}" userInput="{{qty}}" stepKey="fillMaxAllowedQty"/>
19+
<click selector="{{AdminSlideOutDialogSection.doneButton}}" stepKey="clickDone"/>
20+
</actionGroup>
21+
22+
<actionGroup name="AdminProductMaxQtyAllowedInShoppingCartValidationActionGroup" extends="AdminProductSetMaxQtyAllowedInShoppingCart">
23+
<arguments>
24+
<argument name="qty" type="string"/>
25+
<argument name="errorMessage" type="string"/>
26+
</arguments>
27+
28+
<waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" after="clickDone" stepKey="waitProductValidationErrorMessageAppears"/>
29+
<see selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" userInput="{{errorMessage}}" after="waitProductValidationErrorMessageAppears" stepKey="checkProductValidationErrorMessage"/>
30+
</actionGroup>
31+
</actionGroups>

app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventoryConfigData.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,17 @@
2020
<data key="label">No</data>
2121
<data key="value">0</data>
2222
</entity>
23+
<entity name="EnableCatalogInventoryConfigData">
24+
<!--Default Value -->
25+
<data key="path">cataloginventory/options/can_subtract</data>
26+
<data key="scope_id">0</data>
27+
<data key="label">Yes</data>
28+
<data key="value">1</data>
29+
</entity>
30+
<entity name="DisableCatalogInventoryConfigData">
31+
<data key="path">cataloginventory/options/can_subtract</data>
32+
<data key="scope_id">0</data>
33+
<data key="label">No</data>
34+
<data key="value">0</data>
35+
</entity>
2336
</entities>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DefaultValueForMaxSaleQty" type="cataloginventory_item_options">
12+
<requiredEntity type="max_sale_qty">MaxSaleQtyDefaultValue</requiredEntity>
13+
</entity>
14+
<entity name="MaxSaleQtyDefaultValue" type="max_sale_qty">
15+
<data key="value">10000</data>
16+
</entity>
17+
</entities>

app/code/Magento/CatalogInventory/Test/Mftf/Data/CatalogInventryConfigData.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
9+
<operation name="CatalogInventoryProductStockOptionsConfiguration" dataType="cataloginventory_item_options" type="create"
10+
auth="adminFormKey" url="/admin/system_config/save/section/cataloginventory/" method="POST" successRegex="/messages-message-success/">
11+
<object key="groups" dataType="cataloginventory_item_options">
12+
<object key="item_options" dataType="cataloginventory_item_options">
13+
<object key="fields" dataType="cataloginventory_item_options">
14+
<object key="max_sale_qty" dataType="max_sale_qty">
15+
<field key="value">integer</field>
16+
</object>
17+
</object>
18+
</object>
19+
</object>
20+
</operation>
21+
</operations>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminInventoryProductStockOptionsConfigPage" url="admin/system_config/edit/section/cataloginventory/#cataloginventory_item_options-link" area="admin" module="Magento_Config">
12+
<section name="AdminInventoryProductStockOptionsConfigSection"/>
13+
</page>
14+
</pages>

0 commit comments

Comments
 (0)