Skip to content

Commit 7c785cf

Browse files
authored
Merge pull request #3443 from magento-borg/BugFixPR
[2.3-develop] Bug Fixes
2 parents c49da73 + adda7da commit 7c785cf

File tree

36 files changed

+669
-57
lines changed

36 files changed

+669
-57
lines changed

app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationStoresPage.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
<page name="WebConfigurationPage" url="admin/system_config/edit/section/web/" area="admin" module="Backend">
1515
<section name="WYSIWYGOptionsSection"/>
1616
</page>
17+
<page name="GeneralConfigurationPage" url="admin/system_config/edit/section/general/" area="admin" module="Backend">
18+
<section name="LocaleOptionsSection"/>
19+
</page>
1720
</pages>
Lines changed: 15 additions & 0 deletions
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="LocaleOptionsSection">
12+
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
13+
<element name="timezone" type="select" selector="#general_locale_timezone"/>
14+
</section>
15+
</sections>

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassStatus.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
1515

1616
/**
17+
* Updates status for a batch of products.
1718
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1819
*/
1920
class MassStatus extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpPostActionInterface
@@ -87,7 +88,7 @@ public function execute()
8788
$filterRequest = $this->getRequest()->getParam('filters', null);
8889
$status = (int) $this->getRequest()->getParam('status');
8990

90-
if (null !== $storeId && null !== $filterRequest) {
91+
if (null === $storeId && null !== $filterRequest) {
9192
$storeId = (isset($filterRequest['store_id'])) ? (int) $filterRequest['store_id'] : 0;
9293
}
9394

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,28 @@
275275
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
276276
<waitForPageLoad stepKey="waitForPageLoad"/>
277277
</actionGroup>
278+
279+
<!--Create a Simple Product-->
280+
<actionGroup name="createSimpleProductAndAddToWebsite">
281+
<arguments>
282+
<argument name="product"/>
283+
<argument name="website" type="string"/>
284+
</arguments>
285+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
286+
<waitForPageLoad stepKey="waitForProductGrid"/>
287+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
288+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
289+
<fillField userInput="{{product.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
290+
<fillField userInput="{{product.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSKU"/>
291+
<fillField userInput="{{product.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillProductPrice"/>
292+
<fillField userInput="{{product.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillProductQuantity"/>
293+
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsites"/>
294+
<click selector="{{ProductInWebsitesSection.website(website)}}" stepKey="selectWebsite"/>
295+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
296+
<waitForLoadingMaskToDisappear stepKey="waitForProductPageSave"/>
297+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
298+
</actionGroup>
299+
278300
<actionGroup name="CreatedProductConnectToWebsite">
279301
<arguments>
280302
<argument name="website"/>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@
164164
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.title}}" stepKey="waitForConfirmModal"/>
165165
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmProductDelete"/>
166166
</actionGroup>
167+
<!--Delete all products by filtering grid and using mass delete action-->
168+
<actionGroup name="deleteAllDuplicateProductUsingProductGrid" extends="deleteProductUsingProductGrid">
169+
<arguments>
170+
<argument name="product"/>
171+
</arguments>
172+
<remove keyForRemoval="seeProductSkuInGrid"/>
173+
</actionGroup>
167174

168175
<!--Delete a product by filtering grid and using delete action-->
169176
<actionGroup name="deleteProductBySku">

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,36 @@
434434
<data key="status">1</data>
435435
<requiredEntity type="product_extension_attribute">EavStock100</requiredEntity>
436436
</entity>
437+
<entity name="simpleProductForMassUpdate" type="product">
438+
<data key="sku" unique="suffix">testSku</data>
439+
<data key="type_id">simple</data>
440+
<data key="attribute_set_id">4</data>
441+
<data key="visibility">4</data>
442+
<data key="name" unique="suffix">massUpdateProductName</data>
443+
<data key="keyword">massUpdateProductName</data>
444+
<data key="price">123.00</data>
445+
<data key="urlKey" unique="suffix">masstesturlkey</data>
446+
<data key="status">1</data>
447+
<data key="quantity">100</data>
448+
<data key="weight">1</data>
449+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
450+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
451+
</entity>
452+
<entity name="simpleProductForMassUpdate2" type="product">
453+
<data key="sku" unique="suffix">testSku</data>
454+
<data key="type_id">simple</data>
455+
<data key="attribute_set_id">4</data>
456+
<data key="visibility">4</data>
457+
<data key="name" unique="suffix">massUpdateProductName</data>
458+
<data key="keyword">massUpdateProductName</data>
459+
<data key="price">123.00</data>
460+
<data key="urlKey" unique="suffix">masstesturlkey</data>
461+
<data key="status">1</data>
462+
<data key="quantity">100</data>
463+
<data key="weight">1</data>
464+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
465+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
466+
</entity>
437467
<entity name="ApiSimpleSingleQty" type="product2">
438468
<data key="sku" unique="suffix">api-simple-product</data>
439469
<data key="type_id">simple</data>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,6 @@
7575
<element name="Scope" type="select" selector="#is_global"/>
7676
<element name="AddToColumnOptions" type="select" selector="#is_used_in_grid"/>
7777
<element name="UseInFilterOptions" type="select" selector="#is_filterable_in_grid"/>
78+
<element name="UseInProductListing" type="select" selector="#used_in_product_listing"/>
7879
</section>
7980
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFiltersSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@
2828
<element name="priceOfFirstRow" type="text" selector="//tr[@data-repeat-index='0']//div[contains(., '{{var1}}')]" parameterized="true"/>
2929
<element name="AllProductsNotOfBundleType" type="text" selector="//td[5]/div[text() != 'Bundle Product']"/>
3030
<element name="attributeSetOfFirstRow" type="text" selector="//tr[@data-repeat-index='0']//div[contains(., '{{var1}}')]" parameterized="true"/>
31+
<element name="storeViewDropDown" type="multiselect" selector="//select[@name='store_id']" timeout="30"/>
32+
<element name="storeViewOption" type="multiselect" selector="//select[@name='store_id']/option[contains(text(),'{{var1}}')]" parameterized="true" timeout="30"/>
3133
</section>
3234
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormActionSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="saveAndClose" type="button" selector="span[title='Save &amp; Close']" timeout="30"/>
1616
<element name="changeStoreButton" type="button" selector="#store-change-button" timeout="10"/>
1717
<element name="selectStoreView" type="button" selector="//ul[@data-role='stores-list']/li/a[normalize-space(.)='{{var1}}']" timeout="10" parameterized="true"/>
18+
<element name="saveAndDuplicate" type="button" selector="span[id='save_and_duplicate']" timeout="30"/>
1819
</section>
1920
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/>
2929
<element name="productGridCheckboxOnRow" type="checkbox" selector="//*[@id='container']//tr[{{row}}]/td[1]//input" parameterized="true"/>
3030
<element name="productGridNameProduct" type="input" selector="//tbody//tr//td//div[contains(., '{{var1}}')]" parameterized="true" timeout="30"/>
31+
<element name="productGridContentsOnRow" type="checkbox" selector="//*[@id='container']//tr[{{row}}]/td" parameterized="true"/>
3132
<element name="selectRowBasedOnName" type="input" selector="//td/div[text()='{{var1}}']" parameterized="true"/>
3233
</section>
3334
</sections>

0 commit comments

Comments
 (0)