Skip to content

Commit

Permalink
Merge branch '2.4-develop' into feature/review-graphql-261
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard13 authored Jun 11, 2020
2 parents 4fedd42 + 8513dfd commit 64f9f00
Show file tree
Hide file tree
Showing 252 changed files with 10,831 additions and 2,529 deletions.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: GraphQL Story
about: User story for GraphQL project
labels: 'Project: GraphQL'

---

*As a ___ I want to ___ so that ___.*

### AC
* a
* b
### Approved Schema
* a
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getItems()
$this->_compareProduct->setAllowUsedFlat(false);

$this->_items = $this->_itemCollectionFactory->create();
$this->_items->useProductItem(true)->setStoreId($this->_storeManager->getStore()->getId());
$this->_items->useProductItem()->setStoreId($this->_storeManager->getStore()->getId());

if ($this->httpContext->getValue(Context::CONTEXT_AUTH)) {
$this->_items->setCustomerId($this->currentCustomer->getCustomerId());
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Helper/Product/Compare.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function getItemCollection()
// cannot be placed in constructor because of the cyclic dependency which cannot be fixed with proxy class
// collection uses this helper in constructor when calling isEnabledFlat() method
$this->_itemCollection = $this->_itemCollectionFactory->create();
$this->_itemCollection->useProductItem(true)->setStoreId($this->_storeManager->getStore()->getId());
$this->_itemCollection->useProductItem()->setStoreId($this->_storeManager->getStore()->getId());

if ($this->_customerSession->isLoggedIn()) {
$this->_itemCollection->setCustomerId($this->_customerSession->getCustomerId());
Expand Down Expand Up @@ -313,7 +313,7 @@ public function calculate($logout = false)
{
/** @var $collection Collection */
$collection = $this->_itemCollectionFactory->create()
->useProductItem(true);
->useProductItem();
if (!$logout && $this->_customerSession->isLoggedIn()) {
$collection->setCustomerId($this->_customerSession->getCustomerId());
} elseif ($this->_customerId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminProductFormCategoryExistInCategoryListActionGroup">
<annotations>
<description>Check Category exist in Category list for Assign to Product.</description>
</annotations>
<arguments>
<argument name="categoryName" type="string"/>
</arguments>

<click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/>
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="{{categoryName}}"
stepKey="fillSearchCategory"/>
<see selector="{{AdminProductFormSection.selectCategory(categoryName)}}" userInput="{{categoryName}}"
stepKey="seeCategory"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="clickOnDoneAdvancedCategorySelect"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminProductFormCategoryNotExistInCategoryListActionGroup">
<annotations>
<description>Check Category not exist in Category list for Assign to Product.</description>
</annotations>
<arguments>
<argument name="categoryName" type="string"/>
</arguments>

<click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/>
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="{{categoryName}}"
stepKey="fillSearchCategory"/>
<dontSee selector="{{AdminProductFormSection.selectCategory(categoryName)}}" userInput="{{categoryName}}"
stepKey="seeCategory"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="clickOnDoneAdvancedCategorySelect"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSubmitCategoriesPopupActionGroup">
<annotations>
<description>Clicks the "Done" button on the Search Categories popup.</description>
</annotations>

<click selector="{{AdminProductFormSection.done}}" stepKey="clickOnDoneButton" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertStorefrontCategoryCurrentPageIsNthActionGroup">
<arguments>
<argument name="expectedPage" type="string"/>
</arguments>

<grabTextFrom selector="{{StorefrontCategoryBottomToolbarSection.currentPage}}" stepKey="currentPageText"/>
<assertEquals stepKey="assertIsPageNth">
<expectedResult type="string">{{expectedPage}}</expectedResult>
<actualResult type="variable">currentPageText</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontNavigateCategoryNextPageActionGroup">
<annotations>
<description>Navigates storefront category next page from toolbar</description>
</annotations>
<scrollTo selector="{{StorefrontCategoryBottomToolbarSection.nextPage}}" stepKey="scrollToNextButton"/>
<click selector="{{StorefrontCategoryBottomToolbarSection.nextPage}}" stepKey="clickOnNextPage"/>
<waitForPageLoad stepKey="waitForNextCategoryPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<element name="previousPage" type="button" selector=".//*[@class='toolbar toolbar-products'][2]//a[contains(@class, 'previous')]" timeout="30"/>
<element name="pageNumber" type="text" selector="//*[@class='toolbar toolbar-products'][2]//a[contains(@class, 'page')]//span[2][contains(text() ,'{{var1}}')]" parameterized="true"/>
<element name="perPage" type="select" selector="//*[@class='toolbar toolbar-products'][2]//select[@id='limiter']"/>
<element name="currentPage" type="text" selector=".products.wrapper + .toolbar-products .pages .current span:nth-of-type(2)"/>
<element name="currentPage" type="text" selector=".//*[@class='toolbar toolbar-products'][2]//li[contains(@class, 'current')]//span[2]" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,11 @@ public function prepareProductIndex($indexData, $productData, $storeId)
foreach ($indexData as $entityId => $attributeData) {
foreach ($attributeData as $attributeId => $attributeValues) {
$value = $this->getAttributeValue($attributeId, $attributeValues, $storeId);
if (!empty($value)) {
if ($value !== null && $value !== false && $value != '') {
if (!isset($index[$attributeId])) {
$index[$attributeId] = [];
}
$index[$attributeId][$entityId] = $value;
$index[$attributeId][$entityId] = $value;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<stories value="Use Advanced Search"/>
<title value="Unable negative price use to advanced search"/>
<description value="Check unable negative price use to advanced search by price from and price to"/>
<severity value="MAJOR"/>
</annotations>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/>
<actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="openAdvancedSearch"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<item name="trigger" xsi:type="string">opc-new-shipping-address</item>
<item name="buttons" xsi:type="array">
<item name="save" xsi:type="array">
<item name="text" xsi:type="string" translate="true">Ship here</item>
<item name="text" xsi:type="string" translate="true">Ship Here</item>
<item name="class" xsi:type="string">action primary action-save-address</item>
</item>
<item name="cancel" xsi:type="array">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<stories value="Delete a CMS Page via the Admin"/>
<title value="Admin should be able to delete CMS Pages"/>
<description value="Admin should be able to delete CMS Pages"/>
<severity value="CRITICAL"/>
<group value="Cms"/>
<group value="WYSIWYGDisabled"/>
</annotations>
Expand Down

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions app/code/Magento/ConfigurableProduct/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<type name="Magento\ConfigurableProduct\Model\ResourceModel\Attribute\OptionSelectBuilderInterface">
<plugin name="Magento_ConfigurableProduct_Plugin_Model_ResourceModel_Attribute_InStockOptionSelectBuilder" type="Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder"/>
</type>
<type name="Magento\Catalog\Model\Product">
<plugin name="product_identities_extender" type="Magento\ConfigurableProduct\Model\Plugin\Frontend\ProductIdentitiesExtender" />
</type>
<type name="Magento\ConfigurableProduct\Model\Product\Type\Configurable">
<plugin name="used_products_cache" type="Magento\ConfigurableProduct\Model\Plugin\Frontend\UsedProductsCache" />
</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@
{{trans "We have received a request to change the following information associated with your account at %store_name: email." store_name=$store.frontend_name}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>
<br>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.frontend_name |raw}}</p>

{{template config_path="design/email/footer_template"}}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@
{{trans "We have received a request to change the following information associated with your account at %store_name: email, password." store_name=$store.frontend_name}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>
<br>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.frontend_name |raw}}</p>

{{template config_path="design/email/footer_template"}}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@
{{trans "We have received a request to change the following information associated with your account at %store_name: password." store_name=$store.frontend_name}}
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
</p>
<br>

<p>{{trans "Thanks,<br>%store_name" store_name=$store.frontend_name |raw}}</p>

{{template config_path="design/email/footer_template"}}
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function convertAttribute(Attribute $attribute, array $attributeValues,
$productAttributes = [];

$retrievedValue = $this->retrieveFieldValue($attributeValues);
if ($retrievedValue) {
if ($retrievedValue !== null) {
$productAttributes[$attribute->getAttributeCode()] = $retrievedValue;

if ($attribute->getIsSearchable()) {
Expand Down Expand Up @@ -354,7 +354,7 @@ private function getAttributeOptions(Attribute $attribute, int $storeId): array
*/
private function retrieveFieldValue(array $values)
{
$values = \array_filter(\array_unique($values));
$values = \array_unique($values);

return count($values) === 1 ? \array_shift($values) : \array_values($values);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function buildFilter(RequestFilterInterface $filter)
$fieldName .= '.' . $suffix;
}

if ($filter->getValue()) {
if ($filter->getValue() !== false) {
$operator = is_array($filter->getValue()) ? 'terms' : 'term';
$filterQuery []= [
$operator => [
Expand Down
Loading

0 comments on commit 64f9f00

Please sign in to comment.