Skip to content

Commit d41ef98

Browse files
merge magento/2.3-develop into magento-obsessive-owls/MAGETWO-56442
2 parents 9ddee25 + ef04c2c commit d41ef98

18 files changed

+205
-35
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<features value="Catalog"/>
1313
<stories value="MAGETWO-51484-Input type configuration for custom Product Attributes"/>
1414
<group value="Catalog"/>
15-
<title value="Admin should be able to switch between two versions of TinyMCE"/>
16-
<description value="Admin should be able to switch between two versions of TinyMCE"/>
15+
<title value="Admin are able to change Input Type of Text Editor product attribute"/>
16+
<description value="Admin are able to change Input Type of Text Editor product attribute"/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MAGETWO-85745"/>
18+
<testCaseId value="MC-6215"/>
1919
</annotations>
2020
<before>
2121
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<title value="Admin should be able to sell products with different variants of their own"/>
1616
<description value="Admin should be able to sell products with different variants of their own"/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MAGETWO-58184"/>
18+
<testCaseId value="MC-16476"/>
1919
<group value="product"/>
2020
</annotations>
2121

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<annotations>
1313
<features value="Catalog"/>
1414
<stories value="Purchase a product with Custom Options of different types"/>
15-
<title value="Admin should be able to sell products with different variants of their own"/>
16-
<description value="Admin should be able to sell products with different variants of their own"/>
15+
<title value="Admin should be able to sell products with custom options of different types"/>
16+
<description value="Admin should be able to sell products with custom options of different types"/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MAGETWO-61717"/>
18+
<testCaseId value="MC-16462"/>
1919
<group value="Catalog"/>
2020
</annotations>
2121
<before>

app/code/Magento/Catalog/Test/Unit/Pricing/Price/TierPriceTest.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,40 @@ public function dataProviderGetSavePercent()
393393
['basePrice' => '20.80', 'tierPrice' => '18.72', 'savedPercent' => '10']
394394
];
395395
}
396+
397+
/**
398+
* @param null|string|float $quantity
399+
* @param float $expectedValue
400+
* @dataProvider getQuantityDataProvider
401+
*/
402+
public function testGetQuantity($quantity, $expectedValue)
403+
{
404+
$tierPrice = new TierPrice(
405+
$this->product,
406+
$quantity,
407+
$this->calculator,
408+
$this->priceCurrencyMock,
409+
$this->session,
410+
$this->groupManagement,
411+
$this->customerGroupRetriever
412+
);
413+
414+
$this->assertEquals($expectedValue, $tierPrice->getQuantity());
415+
}
416+
417+
/**
418+
* @return array
419+
*/
420+
public function getQuantityDataProvider()
421+
{
422+
return [
423+
[null, 1],
424+
['one', 1],
425+
['', 1],
426+
[4, 4],
427+
[4.5, 4.5],
428+
['0.7', 0.7],
429+
['0.0000000', 1]
430+
];
431+
}
396432
}

app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="MAGETWO-91465"/>
15-
<title value="Guest Checkout"/>
15+
<title value="Guest Checkout - address State field should not allow just integer values"/>
1616
<description value="Address State field should not allow just integer values"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MAGETWO-93203"/>
18+
<testCaseId value="MC-6223"/>
1919
<group value="checkout"/>
2020
</annotations>
2121
<before>

app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<title value="Customer Checkout"/>
1616
<description value="To be sure that other elements of Success page are shown for placed order as registered Customer."/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MAGETWO-60345"/>
18+
<testCaseId value="MC-16488"/>
1919
<group value="checkout"/>
2020
</annotations>
2121

@@ -135,10 +135,10 @@
135135
<annotations>
136136
<features value="Checkout"/>
137137
<stories value="Success page elements are presented for placed order as Guest"/>
138-
<title value="Customer Checkout"/>
139-
<description value="To be sure that other elements of Success page are presented for placed order as Guest."/>
138+
<title value="Guest Checkout - elements of success page are presented for placed order as guest"/>
139+
<description value="To be sure that other elements of Success page are presented for placed order as Guest"/>
140140
<severity value="CRITICAL"/>
141-
<testCaseId value="MAGETWO-60346"/>
141+
<testCaseId value="MC-16490"/>
142142
<group value="checkout"/>
143143
</annotations>
144144

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Checkout via the Admin"/>
15-
<title value="Customer Checkout"/>
15+
<title value="Customer Checkout via the Admin"/>
1616
<description value="Should be able to place an order as a customer."/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-5922"/>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Checkout via Guest Checkout"/>
15-
<title value="Guest Checkout"/>
16-
<description value="Should be able to place an order as a Guest."/>
15+
<title value="Guest Checkout - guest should be able to place an order"/>
16+
<description value="Should be able to place an order as a Guest"/>
1717
<severity value="CRITICAL"/>
18-
<testCaseId value="MAGETWO-72094"/>
18+
<testCaseId value="MC-12825"/>
1919
<group value="checkout"/>
2020
</annotations>
2121
<before>

app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<title value="Conflict resolution for PayPal in United Kingdom"/>
1616
<description value="A popup should show when enabling different paypal solutions when one is already enabled for merchant country United Kingdom"/>
1717
<severity value="Major"/>
18-
<testCaseId value="MC-13146"/>
18+
<testCaseId value="MC-16679"/>
1919
<group value="paypal"/>
2020
</annotations>
2121
<before>
@@ -120,7 +120,7 @@
120120
<title value="Conflict resolution for PayPal in France"/>
121121
<description value="A popup should show when enabling different paypal solutions when one is already enabled for merchant country France"/>
122122
<severity value="Major"/>
123-
<testCaseId value="MC-13146"/>
123+
<testCaseId value="MC-16675"/>
124124
<group value="paypal"/>
125125
</annotations>
126126
<selectOption selector="{{PaymentsConfigSection.merchantCountry}}" userInput="France" stepKey="setMerchantCountry"/>
@@ -160,7 +160,7 @@
160160
<title value="Conflict resolution for PayPal in Hong Kong"/>
161161
<description value="A popup should show when enabling different paypal solutions when one is already enabled for merchant country Hong Kong"/>
162162
<severity value="Major"/>
163-
<testCaseId value="MC-13146"/>
163+
<testCaseId value="MC-16676"/>
164164
<group value="paypal"/>
165165
</annotations>
166166
<selectOption selector="{{PaymentsConfigSection.merchantCountry}}" userInput="Hong Kong SAR China" stepKey="setMerchantCountry"/>
@@ -200,7 +200,7 @@
200200
<title value="Conflict resolution for PayPal in Italy"/>
201201
<description value="A popup should show when enabling different paypal solutions when one is already enabled for merchant country Italy"/>
202202
<severity value="Major"/>
203-
<testCaseId value="MC-13146"/>
203+
<testCaseId value="MC-16677"/>
204204
<group value="paypal"/>
205205
</annotations>
206206
<selectOption selector="{{PaymentsConfigSection.merchantCountry}}" userInput="Italy" stepKey="setMerchantCountry"/>
@@ -240,7 +240,7 @@
240240
<title value="Conflict resolution for PayPal in Spain"/>
241241
<description value="A popup should show when enabling different paypal solutions when one is already enabled for merchant country Spain"/>
242242
<severity value="Major"/>
243-
<testCaseId value="MC-13146"/>
243+
<testCaseId value="MC-16678"/>
244244
<group value="paypal"/>
245245
</annotations>
246246
<selectOption selector="{{PaymentsConfigSection.merchantCountry}}" userInput="Spain" stepKey="setMerchantCountry"/>

app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<title value="Admin should able to switch between versions of TinyMCE"/>
1717
<description value="Admin should able to switch between versions of TinyMCE"/>
1818
<severity value="CRITICAL"/>
19-
<testCaseId value="MAGETWO-82936"/>
19+
<testCaseId value="MC-6114"/>
2020
</annotations>
2121
<before>
2222
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>

app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import"/>
1515
<description value="Check Url Rewrites Correctly Generated for Multiple Storeviews During Product Import."/>
1616
<severity value="CRITICAL"/>
17-
<testCaseId value="MAGETWO-68980"/>
17+
<testCaseId value="MC-12656"/>
1818
<group value="urlRewrite"/>
1919
</annotations>
2020
<before>
@@ -118,10 +118,10 @@
118118
<annotations>
119119
<features value="Url Rewrite"/>
120120
<stories value="Url Rewrites for Multiple Storeviews"/>
121-
<title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import"/>
121+
<title value="Url Rewrites Correctly Generated for Multiple Storeviews During Product Import With Configuration Turned Off"/>
122122
<description value="Check Url Rewrites Correctly Generated for Multiple Storeviews During Product Import."/>
123123
<severity value="CRITICAL"/>
124-
<testCaseId value="MAGETWO-94801"/>
124+
<testCaseId value="MC-6802"/>
125125
<group value="urlRewrite"/>
126126
</annotations>
127127
<before>

app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<title value="Url-rewrites for product in anchor categories"/>
1515
<description value="For a product with category that has parent anchor categories, the rewrites is created when the category/product is saved."/>
1616
<severity value="CRITICAL"/>
17-
<testCaseId value="MAGETWO-76098"/>
17+
<testCaseId value="MC-16568"/>
1818
<group value="urlRewrite"/>
1919
</annotations>
2020

@@ -83,10 +83,10 @@
8383
<annotations>
8484
<features value="Url Rewrite"/>
8585
<stories value="Url-rewrites for product in anchor categories"/>
86-
<title value="Url-rewrites for product in anchor categories"/>
86+
<title value="Url-rewrites for product in anchor categories with configuration turned off"/>
8787
<description value="For a product with category that has parent anchor categories, the rewrites is created when the category/product is saved."/>
8888
<severity value="CRITICAL"/>
89-
<testCaseId value="MAGETWO-94800"/>
89+
<testCaseId value="MC-6844"/>
9090
<group value="urlRewrite"/>
9191
</annotations>
9292

@@ -183,10 +183,10 @@
183183
<annotations>
184184
<features value="Url Rewrite"/>
185185
<stories value="Url-rewrites for product in anchor categories for all store views"/>
186-
<title value="Url-rewrites for product in anchor categories"/>
186+
<title value="Url-rewrites for product in anchor categories for all store views"/>
187187
<description value="Verify that Saving category do not delete UrlRewrites for subcategories and all products in them."/>
188188
<severity value="CRITICAL"/>
189-
<testCaseId value="MAGETWO-76301"/>
189+
<testCaseId value="MC-16681"/>
190190
<group value="urlRewrite"/>
191191
</annotations>
192192
<before>
@@ -210,10 +210,10 @@
210210
<annotations>
211211
<features value="Url Rewrite"/>
212212
<stories value="Url-rewrites for product in anchor categories for all store views"/>
213-
<title value="Url-rewrites for product in anchor categories"/>
214-
<description value="Verify that Saving category do not delete UrlRewrites for subcategories and all products in them."/>
213+
<title value="Url-rewrites for product in anchor categories for all store views with configuration turned off"/>
214+
<description value="Url-rewrites for product in anchor categories for all store views with configuration turned off"/>
215215
<severity value="CRITICAL"/>
216-
<testCaseId value="MAGETWO-94802"/>
216+
<testCaseId value="MC-6964"/>
217217
<group value="urlRewrite"/>
218218
</annotations>
219219
<before>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Reports\Controller\Adminhtml\Report\Product;
8+
9+
/**
10+
* @magentoAppArea adminhtml
11+
*/
12+
class SoldTest extends \Magento\TestFramework\TestCase\AbstractBackendController
13+
{
14+
public function testExecute()
15+
{
16+
$this->dispatch('backend/reports/report_product/sold');
17+
$actual = $this->getResponse()->getBody();
18+
$this->assertContains('Ordered Products Report', $actual);
19+
//verify if SKU column is presented on grid
20+
$this->assertContains('SKU', $actual);
21+
}
22+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Reports\Model\ResourceModel\Report\Sold;
7+
8+
/**
9+
* Class CollectionTest
10+
*/
11+
class CollectionTest extends \PHPUnit\Framework\TestCase
12+
{
13+
/**
14+
* @var \Magento\Reports\Model\ResourceModel\Product\Sold\Collection
15+
*/
16+
private $collection;
17+
18+
protected function setUp()
19+
{
20+
/**
21+
* @var \Magento\Reports\Model\ResourceModel\Product\Sold\Collection
22+
*/
23+
$this->collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
24+
\Magento\Reports\Model\ResourceModel\Product\Sold\Collection::class
25+
);
26+
}
27+
28+
/**
29+
* @magentoDataFixture Magento/Sales/_files/order_item_with_configurable_for_reorder.php
30+
*/
31+
public function testFilterByProductTypeException()
32+
{
33+
$items = $this->collection->addOrderedQty()->getItems();
34+
$this->assertEquals(1, count($items));
35+
$orderItem = array_shift($items);
36+
$this->assertEquals('1.0000', $orderItem['ordered_qty']);
37+
$this->assertEquals('Configurable Product', $orderItem['order_items_name']);
38+
//verify if order_item_sku exists in return data
39+
$this->assertEquals('simple_20', $orderItem['order_items_sku']);
40+
}
41+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Review\Block\Product;
8+
9+
/**
10+
* Class ReviewRendererTest
11+
*/
12+
class ReviewRendererTest extends \PHPUnit\Framework\TestCase
13+
{
14+
/**
15+
* Test verifies ReviewRenderer::getReviewsSummaryHtml call with $displayIfNoReviews = false
16+
* The reviews summary will be shown as expected only if there is at least one review available
17+
*
18+
* @magentoDataFixture Magento/Review/_files/different_reviews.php
19+
* @magentoAppArea frontend
20+
*/
21+
public function testGetReviewSummaryHtml()
22+
{
23+
$productSku = 'simple';
24+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
25+
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
26+
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
27+
$product = $productRepository->get($productSku);
28+
/** @var ReviewRenderer $reviewRenderer */
29+
$reviewRenderer = $objectManager->create(ReviewRenderer::class);
30+
$actualResult = $reviewRenderer->getReviewsSummaryHtml($product);
31+
$this->assertEquals(2, $reviewRenderer->getReviewsCount());
32+
$this->assertContains('<span itemprop="reviewCount">2</span>', $actualResult);
33+
}
34+
}

dev/tests/integration/testsuite/Magento/Review/_files/different_reviews.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:ignore Magento2.Security.IncludeFile
78
require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php';
89

910
$review = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
@@ -71,3 +72,4 @@
7172
)->getStore()->getId()
7273
]
7374
)->save();
75+
$review->aggregate();

dev/tests/integration/testsuite/Magento/Sales/_files/order_item_with_configurable_for_reorder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
use Magento\Catalog\Api\ProductRepositoryInterface;
88
use Magento\Catalog\Model\ProductRepository;
99

10+
// phpcs:ignore Magento2.Security.IncludeFile
1011
require __DIR__ . '/../../../Magento/ConfigurableProduct/_files/product_configurable.php';
1112

1213
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
13-
14+
// phpcs:ignore Magento2.Security.IncludeFile
1415
$addressData = include __DIR__ . '/../../../Magento/Sales/_files/address_data.php';
1516

1617
$billingAddress = $objectManager->create(\Magento\Sales\Model\Order\Address::class, ['data' => $addressData]);
@@ -62,6 +63,8 @@
6263
$orderItem->setProductType($product->getTypeId());
6364
$orderItem->setProductOptions(['info_buyRequest' => $requestInfo]);
6465
$orderItemSimple->setProductId($simpleProduct->getId());
66+
$orderItem->setName($product->getName());
67+
$orderItem->setSku($simpleProduct->getSku());
6568
$orderItemSimple->setParentItem($orderItem);
6669
$orderItemSimple->setStoreId(0);
6770
$orderItemSimple->setProductType($simpleProduct->getTypeId());

0 commit comments

Comments
 (0)