Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 75d3b00

Browse files
authored
Merge pull request #4 from magento/2.3-develop
latest Pull 2.3 Develop
2 parents c1d987b + d1f9c6b commit 75d3b00

File tree

97 files changed

+1685
-704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1685
-704
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminMainActionsSection">
1212
<element name="save" type="button" selector="#save" timeout="30"/>
13+
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1314
<element name="delete" type="button" selector="#delete" timeout="30"/>
1415
</section>
1516
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="success" type="text" selector="#messages div.message-success"/>
1313
<element name="nthSuccess" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
1414
<element name="error" type="text" selector="#messages div.message-error"/>
15+
<element name="notice" type="text" selector=".message.message-notice.notice"/>
1516
</section>
1617
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminSlideOutDialogSection.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
7-
-->
8-
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1110
<section name="AdminSlideOutDialogSection">

app/code/Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
use Magento\Framework\EntityManager\MetadataPool;
1111

1212
/**
13-
* Class FlatTableBuilder
13+
* Class for building flat index
14+
*
1415
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1516
*/
1617
class FlatTableBuilder
@@ -346,12 +347,21 @@ protected function _updateTemporaryTableByStoreValues(
346347
}
347348

348349
//Update not simple attributes (eg. dropdown)
349-
if (isset($flatColumns[$attributeCode . $valueFieldSuffix])) {
350-
$select = $this->_connection->select()->joinInner(
351-
['t' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
352-
't.option_id = et.' . $attributeCode . ' AND t.store_id=' . $storeId,
353-
[$attributeCode . $valueFieldSuffix => 't.value']
354-
);
350+
$columnName = $attributeCode . $valueFieldSuffix;
351+
if (isset($flatColumns[$columnName])) {
352+
$columnValue = $this->_connection->getIfNullSql('ts.value', 't0.value');
353+
$select = $this->_connection->select();
354+
$select->joinLeft(
355+
['t0' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
356+
't0.option_id = et.' . $attributeCode . ' AND t0.store_id = 0',
357+
[]
358+
)->joinLeft(
359+
['ts' => $this->_productIndexerHelper->getTable('eav_attribute_option_value')],
360+
'ts.option_id = et.' . $attributeCode . ' AND ts.store_id = ' . $storeId,
361+
[]
362+
)->columns(
363+
[$columnName => $columnValue]
364+
)->where($columnValue . ' IS NOT NULL');
355365
if (!empty($changedIds)) {
356366
$select->where($this->_connection->quoteInto('et.entity_id IN (?)', $changedIds));
357367
}
@@ -374,6 +384,8 @@ protected function _getTemporaryTableName($tableName)
374384
}
375385

376386
/**
387+
* Get metadata pool
388+
*
377389
* @return \Magento\Framework\EntityManager\MetadataPool
378390
*/
379391
private function getMetadataPool()
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AdminAssignImageRolesActionGroup">
12+
<arguments>
13+
<argument name="image"/>
14+
</arguments>
15+
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggleState('closed')}}" dependentSelector="{{AdminProductImagesSection.productImagesToggleState('open')}}" visible="false" stepKey="clickSectionImage"/>
16+
<click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/>
17+
<waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/>
18+
<checkOption selector="{{AdminProductImagesSection.roleBase}}" stepKey="checkRoleBase"/>
19+
<checkOption selector="{{AdminProductImagesSection.roleSmall}}" stepKey="checkRoleSmall"/>
20+
<checkOption selector="{{AdminProductImagesSection.roleThumbnail}}" stepKey="checkRoleThumbnail"/>
21+
<checkOption selector="{{AdminProductImagesSection.roleSwatch}}" stepKey="checkRoleSwatch"/>
22+
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
23+
</actionGroup>
24+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070

7171
<!--Save product and see success message-->
7272
<actionGroup name="saveProductForm">
73+
<scrollToTopOfPage stepKey="scrollTopPageProduct"/>
7374
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
7475
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
7576
</actionGroup>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
244244
<click selector="{{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey="clickChangeStatusAction"/>
245245
<click selector="{{AdminProductGridSection.changeStatus('status')}}" stepKey="clickChangeStatusDisabled" parameterized="true"/>
246+
<waitForPageLoad stepKey="waitForStatusToBeChanged"/>
246247
<see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) have been updated." stepKey="seeSuccessMessage"/>
247248
<waitForLoadingMaskToDisappear stepKey="waitForMaskToDisappear"/>
248249
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,4 +497,13 @@
497497
<data key="name" unique="suffix">Product With Long Name And Sku - But not too long</data>
498498
<data key="sku" unique="suffix">Product With Long Name And Sku - But not too long</data>
499499
</entity>
500+
<entity name="Magento3" type="image">
501+
<data key="title" unique="suffix">Magento3</data>
502+
<data key="price">1.00</data>
503+
<data key="file_type">Upload File</data>
504+
<data key="shareable">Yes</data>
505+
<data key="file">magento3.jpg</data>
506+
<data key="filename">magento3</data>
507+
<data key="file_extension">jpg</data>
508+
</entity>
500509
</entities>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<element name="removeImageButton" type="button" selector=".action-remove"/>
1717
<element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/>
1818
<element name="uploadProgressBar" type="text" selector=".uploader .file-row"/>
19+
<element name="productImagesToggleState" type="button" selector="[data-index='gallery'] > [data-state-collapsible='{{status}}']" parameterized="true"/>
1920

2021
<element name="nthProductImage" type="button" selector="#media_gallery_content > div:nth-child({{var}}) img.product-image" parameterized="true"/>
2122
<element name="nthRemoveImageBtn" type="button" selector="#media_gallery_content > div:nth-child({{var}}) button.action-remove" parameterized="true"/>
@@ -32,4 +33,4 @@
3233
<element name="isThumbnailSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Thumbnail']"/>
3334
<element name="isSwatchSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Swatch']"/>
3435
</section>
35-
</sections>
36+
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductMediaSection">
1212
<element name="imageFile" type="text" selector="//*[@class='product media']//img[contains(@src, '{{filename}}')]" parameterized="true"/>
13+
<element name="productImageActive" type="text" selector=".product.media div[data-active=true] > img[src*='{{filename}}']" parameterized="true"/>
1314
</section>
1415
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml

Lines changed: 23 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
</annotations>
2020
<before>
2121
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22-
<!--Create website, Sore adn Store View-->
23-
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="adminCreateWebsite">
24-
<argument name="newWebsiteName" value="secondWebsite"/>
25-
<argument name="websiteCode" value="second_website"/>
22+
<!--Create website, Store and Store View-->
23+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite">
24+
<argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/>
25+
<argument name="websiteCode" value="{{secondCustomWebsite.code}}"/>
2626
</actionGroup>
27-
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateStore">
28-
<argument name="website" value="secondWebsite"/>
29-
<argument name="storeGroupName" value="secondStore"/>
30-
<argument name="storeGroupCode" value="second_store"/>
27+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStoreGroup">
28+
<argument name="website" value="{{secondCustomWebsite.name}}"/>
29+
<argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/>
30+
<argument name="storeGroupCode" value="{{SecondStoreGroupUnique.code}}"/>
3131
</actionGroup>
32-
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="adminCreateStoreView">
33-
<argument name="StoreGroup" value="customStoreTierPrice"/>
34-
<argument name="customStore" value="customStoreView"/>
32+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView">
33+
<argument name="StoreGroup" value="SecondStoreGroupUnique"/>
34+
<argument name="customStore" value="SecondStoreUnique"/>
3535
</actionGroup>
3636

3737
<!--Create Simple Product and Category -->
@@ -60,9 +60,7 @@
6060
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickToOpenWebsiteSection"/>
6161
<waitForPageLoad stepKey="waitForToOpenedWebsiteSection"/>
6262
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite"/>
63-
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
64-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."
65-
stepKey="seeSuccessMessage"/>
63+
<actionGroup ref="saveProductForm" stepKey="saveProduct1"/>
6664

6765
<!-- Set filter to product name and product2 in website 2 only -->
6866
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForProduct2">
@@ -72,12 +70,10 @@
7270
<argument name="product" value="$$createProduct2$$"/>
7371
</actionGroup>
7472
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites">
75-
<argument name="website" value="secondWebsite"/>
73+
<argument name="website" value="{{secondCustomWebsite.name}}"/>
7674
</actionGroup>
7775
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite1"/>
78-
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct1"/>
79-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."
80-
stepKey="seeSuccessMessage1"/>
76+
<actionGroup ref="saveProductForm" stepKey="saveProduct2"/>
8177

8278
<!-- Set filter to product name and product12 assigned to both websites 1 and 2 -->
8379
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForProduct12">
@@ -87,15 +83,13 @@
8783
<argument name="product" value="$$createProduct12$$"/>
8884
</actionGroup>
8985
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites1">
90-
<argument name="website" value="secondWebsite"/>
86+
<argument name="website" value="{{secondCustomWebsite.name}}"/>
9187
</actionGroup>
92-
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/>
93-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."
94-
stepKey="seeSuccessMessage2"/>
88+
<actionGroup ref="saveProductForm" stepKey="saveProduct3"/>
9589
</before>
9690
<after>
9791
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
98-
<argument name="websiteName" value="secondWebsite"/>
92+
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
9993
</actionGroup>
10094
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/>
10195
<deleteData createDataKey="createProduct0" stepKey="deleteProduct"/>
@@ -107,7 +101,6 @@
107101
</after>
108102
<!-- Step 1-2: Open Category page and Set scope selector to All Store Views-->
109103
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/>
110-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
111104
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
112105
stepKey="clickCategoryName"/>
113106
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection"/>
@@ -126,17 +119,9 @@
126119

127120
<!-- Step 3: Set scope selector to Website1( Storeview for the Website 1) -->
128121
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
129-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewDropdownToggle}}"
130-
stepKey="clickStoresList"/>
131-
<waitForPageLoad stepKey="waitForCategoryPageLoad1"/>
132-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewOption('Default Store View')}}"
133-
stepKey="clickStoreView"/>
134-
<waitForElementVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}"
135-
stepKey="waitForPopup1"/>
136-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" stepKey="clickActionAccept"/>
137-
<waitForElementNotVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}"
138-
stepKey="waitForNotVisibleModalAccept"/>
139-
<waitForPageLoad stepKey="waitForCategoryPageLoad2"/>
122+
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="swichToDefaultStoreView">
123+
<argument name="storeView" value="_defaultStore.name"/>
124+
</actionGroup>
140125
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
141126
stepKey="grabTextFromCategory1"/>
142127
<assertRegExp expected="/\(2\)$/" expectedType="string" actual="$grabTextFromCategory1" actualType="variable"
@@ -154,18 +139,9 @@
154139

155140
<!-- Step 4: Set scope selector to Website2 ( StoreView for Website 2) -->
156141
<scrollToTopOfPage stepKey="scrollToTopOfPage1"/>
157-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewDropdownToggle}}"
158-
stepKey="clickStoresList1"/>
159-
<waitForPageLoad stepKey="waitForCategoryPageLoad3"/>
160-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewOption('secondStoreView')}}"
161-
stepKey="clickStoreView1"/>
162-
<waitForElementVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}"
163-
stepKey="waitForPopup2"/>
164-
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}"
165-
stepKey="clickActionAccept1"/>
166-
<waitForElementNotVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}"
167-
stepKey="waitForNotVisibleModalAccept1"/>
168-
<waitForPageLoad stepKey="waitForCategoryPageLoad4"/>
142+
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="swichToSecondStoreView">
143+
<argument name="storeView" value="SecondStoreUnique.name"/>
144+
</actionGroup>
169145
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection2"/>
170146
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
171147
stepKey="grabTextFromCategory2"/>

0 commit comments

Comments
 (0)