Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into test-abstract-…
Browse files Browse the repository at this point in the history
…return-fix
  • Loading branch information
Valeriy Nayda committed Aug 13, 2018
2 parents d2ad2b9 + 1cb9235 commit 22679c1
Show file tree
Hide file tree
Showing 1,327 changed files with 29,618 additions and 14,306 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ Tests:
* [#686](https://github.com/magento/magento2/issues/686) -- Product save validation errors in the admin don't hide the overlay
* [#702](https://github.com/magento/magento2/issues/702) -- Base table or view not found
* [#652](https://github.com/magento/magento2/issues/652) -- Multishipping checkout not to change the Billing address js issue
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to to break the tabs functionality
* [#648](https://github.com/magento/magento2/issues/648) -- An equal (=) sign in the hash of the product page to break the tabs functionality
* Service Contracts:
* Refactored usage of new API of the Customer module
* Implemented Service Contracts for the Sales module
Expand Down
20 changes: 0 additions & 20 deletions app/code/Magento/AdminNotification/Test/Mftf/composer.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{
"[data-role=system_messages_list]": {
"Magento_AdminNotification/js/system/messages/popup": {
class: 'modal-system-messages ui-popup-message'
"class":"modal-system-messages ui-popup-message"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
*/

define([
'jquery',
'Magento_Ui/js/modal/modal'
], function ($) {
], function ($, modal) {
'use strict';

return function (data, element) {
if (this.modal) {
this.modal.html($(element).html());

if (modal.modal) {
modal.modal.html($(element).html());
} else {
this.modal = $(element).modal({
modal.modal = $(element).modal({
modalClass: data.class,
type: 'popup',
buttons: []
});
}
this.modal.modal('openModal');

modal.modal.modal('openModal');
};
});

This file was deleted.

41 changes: 29 additions & 12 deletions app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
namespace Magento\AdvancedSearch\Model\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
use Magento\Framework\Search\Request\IndexScopeResolverInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Model\ResourceModel\Db\Context;
use Magento\Framework\EntityManager\MetadataPool;
use Magento\Catalog\Api\Data\CategoryInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver as TableResolver;
use Magento\Framework\Search\Request\Dimension;
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
use Magento\Framework\Search\Request\IndexScopeResolverInterface as TableResolver;
use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory;

/**
* @api
* @since 100.1.0
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Index extends AbstractDb
{
Expand All @@ -38,25 +42,34 @@ class Index extends AbstractDb
*/
private $tableResolver;

/**
* @var DimensionCollectionFactory|null
*/
private $dimensionCollectionFactory;

/**
* Index constructor.
* @param Context $context
* @param StoreManagerInterface $storeManager
* @param MetadataPool $metadataPool
* @param null $connectionName
* @param TableResolver|null $tableResolver
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
*/
public function __construct(
Context $context,
StoreManagerInterface $storeManager,
MetadataPool $metadataPool,
$connectionName = null,
TableResolver $tableResolver = null
TableResolver $tableResolver = null,
DimensionCollectionFactory $dimensionCollectionFactory = null
) {
parent::__construct($context, $connectionName);
$this->storeManager = $storeManager;
$this->metadataPool = $metadataPool;
$this->tableResolver = $tableResolver ?: ObjectManager::getInstance()->get(TableResolver::class);
$this->tableResolver = $tableResolver ?: ObjectManager::getInstance()->get(IndexScopeResolverInterface::class);
$this->dimensionCollectionFactory = $dimensionCollectionFactory
?: ObjectManager::getInstance()->get(DimensionCollectionFactory::class);
}

/**
Expand All @@ -78,18 +91,22 @@ protected function _construct()
protected function _getCatalogProductPriceData($productIds = null)
{
$connection = $this->getConnection();

$select = $connection->select()->from(
$this->getTable('catalog_product_index_price'),
['entity_id', 'customer_group_id', 'website_id', 'min_price']
);

if ($productIds) {
$select->where('entity_id IN (?)', $productIds);
$catalogProductIndexPriceSelect = [];

foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
$catalogProductIndexPriceSelect[] = $connection->select()->from(
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
['entity_id', 'customer_group_id', 'website_id', 'min_price']
);
if ($productIds) {
current($catalogProductIndexPriceSelect)->where('entity_id IN (?)', $productIds);
}
}

$catalogProductIndexPriceUnionSelect = $connection->select()->union($catalogProductIndexPriceSelect);

$result = [];
foreach ($connection->fetchAll($select) as $row) {
foreach ($connection->fetchAll($catalogProductIndexPriceUnionSelect) as $row) {
$result[$row['website_id']][$row['entity_id']][$row['customer_group_id']] = round($row['min_price'], 2);
}

Expand Down
22 changes: 0 additions & 22 deletions app/code/Magento/AdvancedSearch/Test/Mftf/composer.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\DB\Select;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class IndexTest extends \PHPUnit\Framework\TestCase
{
/**
Expand Down Expand Up @@ -59,10 +62,24 @@ protected function setUp()
$this->resourceConnectionMock->expects($this->any())->method('getConnection')->willReturn($this->adapterMock);
$this->metadataPoolMock = $this->createMock(MetadataPool::class);

$indexScopeResolverMock = $this->createMock(
\Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver::class
);
$traversableMock = $this->createMock(\Traversable::class);
$dimensionsMock = $this->createMock(\Magento\Framework\Indexer\MultiDimensionProvider::class);
$dimensionsMock->method('getIterator')->willReturn($traversableMock);
$dimensionFactoryMock = $this->createMock(
\Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory::class
);
$dimensionFactoryMock->method('create')->willReturn($dimensionsMock);

$this->model = new Index(
$this->resourceContextMock,
$this->storeManagerMock,
$this->metadataPoolMock
$this->metadataPoolMock,
'connectionName',
$indexScopeResolverMock,
$dimensionFactoryMock
);
}

Expand All @@ -71,11 +88,13 @@ public function testGetPriceIndexDataUsesFrontendPriceIndexerTable()
$storeId = 1;
$storeMock = $this->createMock(StoreInterface::class);
$storeMock->expects($this->any())->method('getId')->willReturn($storeId);
$storeMock->method('getWebsiteId')->willReturn(1);
$this->storeManagerMock->expects($this->once())->method('getStore')->with($storeId)->willReturn($storeMock);

$selectMock = $this->createMock(Select::class);
$selectMock->expects($this->any())->method('from')->willReturnSelf();
$selectMock->expects($this->any())->method('where')->willReturnSelf();
$selectMock->expects($this->any())->method('union')->willReturnSelf();
$this->adapterMock->expects($this->once())->method('select')->willReturn($selectMock);
$this->adapterMock->expects($this->once())->method('fetchAll')->with($selectMock)->willReturn([]);

Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/AdvancedSearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"type": "magento2-module",
"license": [
"proprietary"
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
Expand Down
13 changes: 13 additions & 0 deletions app/code/Magento/AdvancedSearch/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@
<argument name="title" xsi:type="string" translatable="true">Did you mean</argument>
</arguments>
</type>
<type name="Magento\AdvancedSearch\Model\Client\ClientResolver">
<arguments>
<argument name="path" xsi:type="const">Magento\CatalogSearch\Model\ResourceModel\EngineInterface::CONFIG_ENGINE_PATH</argument>
<argument name="scopeType" xsi:type="const">\Magento\Store\Model\ScopeInterface::SCOPE_STORE</argument>
</arguments>
</type>
<type name="Magento\AdvancedSearch\Model\SuggestedQueries">
<arguments>
<argument name="data" xsi:type="array">
<item name="mysql" xsi:type="string">Magento\AdvancedSearch\Model\DataProvider\Suggestions</item>
</argument>
</arguments>
</type>
<type name="Magento\AdvancedSearch\Model\ResourceModel\Index">
<arguments>
<argument name="tableResolver" xsi:type="object">
Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver
</argument>
</arguments>
</type>
<preference for="Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProviderInterface" type="Magento\AdvancedSearch\Model\Adapter\DataMapper\AdditionalFieldsProvider" />
</config>
17 changes: 0 additions & 17 deletions app/code/Magento/Amqp/Test/Mftf/composer.json

This file was deleted.

3 changes: 2 additions & 1 deletion app/code/Magento/Amqp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
"type": "magento2-module",
"license": [
"proprietary"
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</after>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
<waitForPageLoad stepKey="waitForAdminConfig"/>
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="--Please Select--"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-66465"/>
<group value="analytics"/>
<!-- MAGETWO-90659 -->
<group value="skip"/>
<skip>
<issueId value="MAGETWO-90659"/>
</skip>
</annotations>
<after>
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-63898"/>
<group value="analytics"/>
<!-- MAGETWO-90659 -->
<group value="skip"/>
<skip>
<issueId value="MAGETWO-90659"/>
</skip>
</annotations>

<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-82648"/>
<group value="analytics"/>
<!-- MAGETWO-90659 -->
<group value="skip"/>
<skip>
<issueId value="MAGETWO-90659"/>
</skip>
</annotations>
<before>
<createData stepKey="noReportUserRole" entity="adminNoReportRole"/>
Expand Down
20 changes: 0 additions & 20 deletions app/code/Magento/Analytics/Test/Mftf/composer.json

This file was deleted.

Loading

0 comments on commit 22679c1

Please sign in to comment.