Skip to content

Commit 6002a52

Browse files
authored
Merge branch '2.4-develop' into patch-3
2 parents fad61bd + e885088 commit 6002a52

File tree

104 files changed

+3696
-1762
lines changed

Some content is hidden

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

104 files changed

+3696
-1762
lines changed

app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleRegularPriceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testGetAmount()
9898
->willReturn($expectedResult);
9999

100100
$this->priceCurrencyMock->expects($this->once())
101-
->method('convertAndRound')
101+
->method('convert')
102102
->willReturnArgument(0);
103103

104104
$result = $this->regularPrice->getAmount();
@@ -123,7 +123,7 @@ public function testGetMaximalPrice()
123123
->willReturn($expectedResult);
124124

125125
$this->priceCurrencyMock->expects($this->once())
126-
->method('convertAndRound')
126+
->method('convert')
127127
->willReturnArgument(0);
128128

129129
$result = $this->regularPrice->getMaximalPrice();
@@ -165,7 +165,7 @@ public function testGetMaximalPriceForFixedPriceBundleWithOption()
165165
->willReturn($expectedPrice);
166166

167167
$this->priceCurrencyMock->expects($this->once())
168-
->method('convertAndRound')
168+
->method('convert')
169169
->willReturnArgument(0);
170170

171171
$result = $this->regularPrice->getMaximalPrice();
@@ -185,7 +185,7 @@ public function testGetMinimalPrice()
185185
->willReturn($expectedResult);
186186

187187
$this->priceCurrencyMock->expects($this->once())
188-
->method('convertAndRound')
188+
->method('convert')
189189
->willReturnArgument(0);
190190

191191
$this->bundleCalculatorMock->expects($this->once())
@@ -226,7 +226,7 @@ public function testGetMinimalPriceForFixedPricedBundleWithOptions()
226226
->willReturn($minOptionPrice);
227227

228228
$this->priceCurrencyMock->expects($this->once())
229-
->method('convertAndRound')
229+
->method('convert')
230230
->willReturnArgument(0);
231231

232232
$this->bundleCalculatorMock->expects($this->once())

app/code/Magento/Catalog/Pricing/Price/RegularPrice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
use Magento\Framework\Pricing\Price\BasePriceProviderInterface;
1111

1212
/**
13-
* Class RegularPrice
13+
* Regular Price model
1414
*/
1515
class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
1616
{
1717
/**
1818
* Price type
1919
*/
20-
const PRICE_CODE = 'regular_price';
20+
public const PRICE_CODE = 'regular_price';
2121

2222
/**
2323
* Get price value
@@ -28,7 +28,7 @@ public function getValue()
2828
{
2929
if ($this->value === null) {
3030
$price = $this->product->getPrice();
31-
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
31+
$priceInCurrentCurrency = $this->priceCurrency->convert($price);
3232
$this->value = $priceInCurrentCurrency ? (float)$priceInCurrentCurrency : 0;
3333
}
3434
return $this->value;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
</arguments>
1818

1919
<waitForElementVisible selector="{{StorefrontWidgetsSection.widgetRecentlyOrderedProductsGrid}}" stepKey="waitWidgetRecentlyOrderedProductsGrid"/>
20-
<see selector="{{StorefrontWidgetsSection.widgetRecentlyOrderedProductsGrid}}" userInput="{{product.name}}" stepKey="seeProductInRecentlyOrderedWidget"/>
20+
<waitForText selector="{{StorefrontWidgetsSection.widgetRecentlyOrderedProductsGrid}}" userInput="{{product.name}}" stepKey="seeProductInRecentlyOrderedWidget"/>
2121
</actionGroup>
2222
</actionGroups>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
</arguments>
1919

2020
<waitForElementVisible selector="{{StorefrontWidgetsSection.widgetRecentlyViewedProductsGrid}}" stepKey="waitWidgetRecentlyViewedProductsGrid"/>
21-
<see selector="{{StorefrontWidgetsSection.widgetRecentlyViewedProductsGrid}}" userInput="{{product.name}}" stepKey="seeProductInRecentlyViewedWidget"/>
21+
<waitForText selector="{{StorefrontWidgetsSection.widgetRecentlyViewedProductsGrid}}" userInput="{{product.name}}" stepKey="seeProductInRecentlyViewedWidget"/>
2222
</actionGroup>
2323
</actionGroups>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<element name="productPriceLinkAfterLabel" type="text" selector="//span[@class='price-label'][contains(text(),'{{var1}}')]/following::span[contains(text(), '{{var2}}')]" parameterized="true"/>
3232
<element name="ProductAddToCartByName" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocart')]" parameterized="true"/>
3333
<!--<element name="ProductAddToCompareByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/>-->
34-
<element name="ProductAddToCompareByName" type="text" selector="//*[contains(@class,'product-item-info')][descendant::a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/>
34+
<element name="ProductAddToCompareByName" type="text" selector="//*[contains(@class,'product-item-info')][descendant::a[contains(text(), '{{var1}}')]]//*[(name()='a' or name()='button') and contains(@class, 'tocompare')]" parameterized="true"/>
3535
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
3636
<element name="ProductStockUnavailable" type="text" selector="//*[text()='Out of stock']"/>
3737
<element name="listedProductOnProductPage" type="block" selector="//div[contains(@aria-labelledBy,'{{attribute_code}}')]//div[@aria-label='{{attribute_name}}']" parameterized="true"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<element name="asLowAsLabel" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][1]"/>
3737
<element name="asLowAsLabelAgain" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][2]"/>
3838
<element name="specialPriceValue" type="text" selector="//span[@class='special-price']//span[@class='price']"/>
39-
<element name="mapPrice" type="text" selector="//div[@class='price-box price-final_price']//span[contains(@class, 'price-msrp_price')]"/>
39+
<element name="mapPrice" type="text" selector="//div[@class='price-box price-final_price']//span[contains(@class, 'price-msrp_price')]//span"/>
4040
<element name="clickForPriceLink" type="text" selector="//div[@class='price-box price-final_price']//a[contains(text(), 'Click for price')]"/>
4141
<element name="addReviewLink" type="text" selector="//div[@class='reviews-actions']//a[@class='action add']"/>
4242
<element name="fptPrice" type="text" selector=".//*[@class='weee']/span"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontAssertsCustomerBehaviourForProductTest">
11+
<test name="StorefrontAssertsCustomerBehaviourForProductTest" deprecated="Use StorefrontSearchToolbarTest instead">
1212
<annotations>
1313
<features value="Catalog"/>
1414
<stories value="Product Sorting for guest/customer in storefront"/>
@@ -17,6 +17,9 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="AC-8905"/>
1919
<group value="catalog"/>
20+
<skip>
21+
<issueId value="DEPRECATED">Use StorefrontSearchToolbarTest instead</issueId>
22+
</skip>
2023
</annotations>
2124
<before>
2225
<!-- Precondition Step.1: Magento should be installed.with Sample Data -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<argument name="currency" value="EUR"/>
6262
</actionGroup>
6363
<actionGroup ref="AssertStorefrontCustomOptionCheckboxByPriceActionGroup" stepKey="checkPriceProductOptionEUR">
64-
<argument name="price" value="8.7"/>
64+
<argument name="price" value="8.69"/>
6565
</actionGroup>
6666
</test>
6767
</tests>

app/code/Magento/Catalog/Test/Unit/Block/Widget/LinkTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,17 @@ public function testStoreCodeShouldBeIncludedInURLOnlyIfItIsConfiguredSo(
195195
[
196196
[Store::XML_PATH_USE_REWRITES, ReinitableConfigInterface::SCOPE_TYPE_DEFAULT, null, true],
197197
[Store::XML_PATH_UNSECURE_BASE_LINK_URL, ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null, ''],
198+
]
199+
);
200+
$config->expects($this->any())
201+
->method('isSetFlag')
202+
->willReturnMap(
203+
[
198204
[
199205
Store::XML_PATH_STORE_IN_URL,
200206
ReinitableConfigInterface::SCOPE_TYPE_DEFAULT,
201-
null, $includeStoreCode
207+
null,
208+
$includeStoreCode
202209
]
203210
]
204211
);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testGetValue($price)
8080
->method('getPrice')
8181
->willReturn($price);
8282
$this->priceCurrencyMock->expects($this->any())
83-
->method('convertAndRound')
83+
->method('convert')
8484
->with($price)
8585
->willReturn($convertedPrice);
8686
$this->assertEquals($convertedPrice, $this->regularPrice->getValue());
@@ -114,7 +114,7 @@ public function testGetAmount()
114114
->method('getPrice')
115115
->willReturn($priceValue);
116116
$this->priceCurrencyMock->expects($this->any())
117-
->method('convertAndRound')
117+
->method('convert')
118118
->with($priceValue)
119119
->willReturn($convertedPrice);
120120
$this->calculatorMock->expects($this->once())

0 commit comments

Comments
 (0)