-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 2.2-develop into ENGCOM-4687-magento-magento2-21340
- Loading branch information
Showing
88 changed files
with
1,754 additions
and
212 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminAccountActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?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="AdminAccountSetInterfaceLocaleActionGroup"> | ||
<arguments> | ||
<argument name="localeName" type="string"/> | ||
</arguments> | ||
<!-- Navigate to admin System Account Page--> | ||
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage"/> | ||
<!-- Change Admin locale to {{localeName}} --> | ||
<selectOption selector="{{AdminSystemAccountSection.interfaceLocale}}" userInput="{{localeName}}" stepKey="setInterfaceLocale"/> | ||
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillCurrentPassword"/> | ||
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/> | ||
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the account." stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Backend/Test/Mftf/Page/AdminSystemAccountPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="AdminSystemAccountPage" url="admin/system_account/index/" area="admin" module="Magento_Backend"> | ||
<section name="AdminSystemAccountSection"/> | ||
</page> | ||
</pages> |
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Backend/Test/Mftf/Section/AdminSystemAccountSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminSystemAccountSection"> | ||
<element name="interfaceLocale" type="text" selector="#interface_locale"/> | ||
<element name="currentPassword" type="text" selector="#current_password"/> | ||
</section> | ||
</sections> |
16 changes: 16 additions & 0 deletions
16
...agento/Braintree/Test/Mftf/ActionGroup/StorefrontPayWithPaypalFromMiniCartActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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="StorefrontPayWithPaypalFromMiniCartActionGroup" extends="StorefrontViewAndEditCartFromMiniCartActionGroup"> | ||
<remove keyForRemoval="viewAndEditCart"/> | ||
<remove keyForRemoval="seeInCurrentUrl"/> | ||
<waitForElementVisible selector="{{StorefrontMiniCartSection.payWithPayPal}}" stepKey="waitForPaypalButtonIsVisible"/> | ||
<click selector="{{StorefrontMiniCartSection.payWithPayPal}}" stepKey="clickPayWithPaypalButton"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Braintree/Test/Mftf/Page/StorefrontPaypalReviewOrderPage.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="StorefrontPaypalReviewOrderPage" url="/braintree/paypal/review" area="storefront" module="Magento_Braintree"> | ||
<section name="StorefrontPaypalReviewOrderShippingSection"/> | ||
<section name="StorefrontPaypalReviewOrderItemsSection"/> | ||
</page> | ||
</pages> |
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Braintree/Test/Mftf/Section/StorefrontMiniCartSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="StorefrontMiniCartSection"> | ||
<element name="payWithPayPal" type="button" selector=".braintree-paypal-button-hidden" timeout="30"/> | ||
<element name="proceedWithSandboxPurchase" type="text" selector="#return_url"/> | ||
</section> | ||
</sections> |
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Braintree/Test/Mftf/Section/StorefrontPaypalReviewOrderItemsSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="StorefrontPaypalReviewOrderItemsSection"> | ||
<element name="placeOrder" type="button" selector="#review-button" timeout="30"/> | ||
<element name="orderSummaryTotal" type="text" selector="tr.grand.totals span.price"/> | ||
</section> | ||
</sections> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Braintree/Test/Mftf/Section/StorefrontPaypalReviewOrderShippingSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="StorefrontPaypalReviewOrderShippingSection"> | ||
<element name="selectShippingMethodByName" type="select" selector="//select[@id='shipping-method']//option[contains(text(),'{{shippingMethod}}')]" parameterized="true"/> | ||
</section> | ||
</sections> |
63 changes: 63 additions & 0 deletions
63
app/code/Magento/Bundle/Block/DataProviders/OptionPriceRenderer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Bundle\Block\DataProviders; | ||
|
||
use Magento\Catalog\Model\Product; | ||
use Magento\Catalog\Pricing\Price\TierPrice; | ||
use Magento\Framework\Pricing\Render; | ||
use Magento\Framework\View\Element\Block\ArgumentInterface; | ||
use Magento\Framework\View\LayoutInterface; | ||
|
||
/** | ||
* Provides additional data for bundle options | ||
*/ | ||
class OptionPriceRenderer implements ArgumentInterface | ||
{ | ||
/** | ||
* Parent layout of the block | ||
* | ||
* @var LayoutInterface | ||
*/ | ||
private $layout; | ||
|
||
/** | ||
* @param LayoutInterface $layout | ||
*/ | ||
public function __construct(LayoutInterface $layout) | ||
{ | ||
$this->layout = $layout; | ||
} | ||
|
||
/** | ||
* Format tier price string | ||
* | ||
* @param Product $selection | ||
* @param array $arguments | ||
* @return string | ||
*/ | ||
public function renderTierPrice(Product $selection, array $arguments = []): string | ||
{ | ||
if (!array_key_exists('zone', $arguments)) { | ||
$arguments['zone'] = Render::ZONE_ITEM_OPTION; | ||
} | ||
|
||
$priceHtml = ''; | ||
|
||
/** @var Render $priceRender */ | ||
$priceRender = $this->layout->getBlock('product.price.render.default'); | ||
if ($priceRender !== false) { | ||
$priceHtml = $priceRender->render( | ||
TierPrice::PRICE_CODE, | ||
$selection, | ||
$arguments | ||
); | ||
} | ||
|
||
return $priceHtml; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.