Skip to content

Commit 4addde1

Browse files
committed
Merge branch '2.3-develop' of https://github.com/magento/magento2ce into MC-5648
2 parents 1f63846 + beb0274 commit 4addde1

File tree

273 files changed

+4739
-1105
lines changed

Some content is hidden

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

273 files changed

+4739
-1105
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="SetAdminAccountActionGroup">
12+
<arguments>
13+
<argument name="InterfaceLocaleByValue" type="string"/>
14+
</arguments>
15+
<!-- Navigate to admin System Account Page-->
16+
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage" />
17+
<waitForPageLoad stepKey="loadAdminSystemAccountPage"/>
18+
<!-- Change Admin locale to Français (France) / French (France) -->
19+
<selectOption userInput="{{InterfaceLocaleByValue}}" selector="{{AdminSystemAccountSection.interfaceLocale}}" stepKey="setInterfaceLocate"/>
20+
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
21+
<click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="clickSave"/>
22+
<waitForElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="waitSuccessMessage"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminSystemAccountPage" url="admin/system_account/index/" area="admin" module="Magento_Backend">
12+
<section name="AdminSystemAccountSection"/>
13+
</page>
14+
</pages>

app/code/Magento/Cms/Test/Mftf/Section/StorefrontHeaderSection.xml renamed to app/code/Magento/Backend/Test/Mftf/Section/AdminSystemAccountSection.xml

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

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11-
<section name="StorefrontHeaderSection">
11+
<section name="AdminSystemAccountSection">
12+
<element name="interfaceLocale" type="text" selector="#interface_locale"/>
13+
<element name="currentPassword" type="text" selector="#current_password"/>
1214
</section>
1315
</sections>

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="LocaleOptionsSection">
1212
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
1313
<element name="timezone" type="select" selector="#general_locale_timezone"/>
14+
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1415
</section>
1516
</sections>

app/code/Magento/User/Test/Mftf/ActionGroup/AdminRoleActionGroup.xml renamed to app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminRoleActionGroup.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
1011
<actionGroup name="GoToUserRoles">
1112
<click selector="#menu-magento-backend-system" stepKey="clickOnSystemIcon"/>
1213
<waitForPageLoad stepKey="waitForSystemsPageToOpen"/>
@@ -15,18 +16,19 @@
1516
</actionGroup>
1617

1718
<!--Create new role-->
18-
<actionGroup name="AdminCreateRole">
19+
<actionGroup name="AdminCreateNewRole">
1920
<arguments>
2021
<argument name="role" type="string" defaultValue=""/>
2122
<argument name="resource" type="string" defaultValue="All"/>
23+
<argument name="scope" type="string" defaultValue="Custom"/>
24+
<argument name="websites" type="string" defaultValue="Main Website"/>
2225
</arguments>
2326
<click selector="{{AdminCreateRoleSection.create}}" stepKey="clickToAddNewRole"/>
2427
<fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{role.name}}" stepKey="setRoleName"/>
2528
<fillField stepKey="setPassword" selector="{{AdminCreateRoleSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
2629
<click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/>
2730
<waitForPageLoad stepKey="waitForRoleResourcePage" time="5"/>
28-
<click selector="{{AdminCreateRoleSection.roleScope}}" stepKey="clickToExpandScopeAccess"/>
29-
<click selector="{{AdminCreateRoleSection.scopeValue(resource)}}" stepKey="clickToSelectScopeAccess"/>
31+
<click stepKey="checkSales" selector="//a[text()='Sales']"/>
3032
<click selector="{{AdminCreateRoleSection.save}}" stepKey="clickToSaveRole"/>
3133
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
3234
<see userInput="You saved the role." stepKey="seeSuccessMessage" />
@@ -46,4 +48,4 @@
4648
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
4749
<see stepKey="seeSuccessMessage" userInput="You deleted the role."/>
4850
</actionGroup>
49-
</actionGroups>
51+
</actionGroups>

app/code/Magento/User/Test/Mftf/ActionGroup/AdminUserActionGroup.xml renamed to app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminUserActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141

4242

4343
<!--Delete User-->
44-
<actionGroup name="AdminDeleteUserActionGroup">
44+
<actionGroup name="AdminDeleteNewUserActionGroup">
45+
4546
<click stepKey="clickOnUser" selector="{{AdminDeleteUserSection.theUser}}"/>
46-
<waitForPageLoad stepKey="waitForUserPageToLoad"/>
4747
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteUserSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
4848
<scrollToTopOfPage stepKey="scrollToTop"/>
4949
<click stepKey="clickToDeleteUser" selector="{{AdminDeleteUserSection.delete}}"/>
@@ -52,4 +52,5 @@
5252
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
5353
<see userInput="You deleted the user." stepKey="seeSuccessMessage" />
5454
</actionGroup>
55+
5556
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@
4040

4141
<!--Create New Role-->
4242
<actionGroup ref="GoToUserRoles" stepKey="GoToUserRoles"/>
43-
<actionGroup ref="AdminCreateRole" stepKey="AdminCreateNewRole"/>
43+
<waitForPageLoad stepKey="waitForAllRoles" time="15"/>
44+
<actionGroup ref="AdminCreateNewRole" stepKey="AdminCreateNewRole"/>
4445

45-
<!--Create New User With Specific Role-->
46+
<!--Create new admin user-->
4647
<actionGroup ref="GoToAllUsers" stepKey="GoToAllUsers"/>
48+
<waitForPageLoad stepKey="waitForUsers" time="15"/>
4749
<actionGroup ref="AdminCreateUserAction" stepKey="AdminCreateNewUser"/>
4850

4951
<!--SignOut-->
5052
<actionGroup ref="logout" stepKey="signOutFromAdmin"/>
5153

52-
<!--SignIn New User-->
54+
<!--Log in as new user-->
5355
<actionGroup ref="LoginNewUser" stepKey="signInNewUser"/>
5456
<waitForPageLoad stepKey="waitForLogin" time="3"/>
5557

@@ -93,7 +95,7 @@
9395

9496
<!--Delete User -->
9597
<actionGroup ref="GoToAllUsers" stepKey="GoBackToAllUsers"/>
96-
<actionGroup ref="AdminDeleteUserActionGroup" stepKey="AdminDeleteUserActionGroup"/>
98+
<actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="AdminDeleteUserActionGroup"/>
9799

98100
<!--Delete Role-->
99101
<actionGroup ref="GoToUserRoles" stepKey="GoBackToUserRoles"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@
131131

132132
<!--Check all products and Cart Subtotal -->
133133
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssert" after="waitForDetailsOpen">
134-
<argument name="subtotal" value="BundleProductsSummary.subtotal"/>
135-
<argument name="shipping" value="BundleProductsSummary.shipping"/>
136-
<argument name="shippingMethod" value="BundleProductsSummary.shippingMethod"/>
137-
<argument name="total" value="BundleProductsSummary.total"/>
134+
<argument name="subtotal" value="1,968.00"/>
135+
<argument name="shipping" value="5.00"/>
136+
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
137+
<argument name="total" value="1,973.00"/>
138138
</actionGroup>
139139
</test>
140140
</tests>

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Bundle\Test\Unit\Pricing\Price;
77

88
use \Magento\Bundle\Pricing\Price\SpecialPrice;
9+
use Magento\Store\Api\Data\WebsiteInterface;
910

1011
class SpecialPriceTest extends \PHPUnit\Framework\TestCase
1112
{
@@ -77,12 +78,6 @@ public function testGetValue($regularPrice, $specialPrice, $isScopeDateInInterva
7778
->method('getSpecialPrice')
7879
->will($this->returnValue($specialPrice));
7980

80-
$store = $this->getMockBuilder(\Magento\Store\Model\Store::class)
81-
->disableOriginalConstructor()
82-
->getMock();
83-
$this->saleable->expects($this->once())
84-
->method('getStore')
85-
->will($this->returnValue($store));
8681
$this->saleable->expects($this->once())
8782
->method('getSpecialFromDate')
8883
->will($this->returnValue($specialFromDate));
@@ -92,7 +87,7 @@ public function testGetValue($regularPrice, $specialPrice, $isScopeDateInInterva
9287

9388
$this->localeDate->expects($this->once())
9489
->method('isScopeDateInInterval')
95-
->with($store, $specialFromDate, $specialToDate)
90+
->with(WebsiteInterface::ADMIN_CODE, $specialFromDate, $specialToDate)
9691
->will($this->returnValue($isScopeDateInInterval));
9792

9893
$this->priceCurrencyMock->expects($this->never())

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Framework\UrlInterface;
1515
use Magento\Ui\Component\Container;
1616
use Magento\Ui\Component\Form;
17+
use Magento\Ui\Component\Form\Fieldset;
1718
use Magento\Ui\Component\Modal;
1819

1920
/**
@@ -69,13 +70,26 @@ public function __construct(
6970
}
7071

7172
/**
72-
* {@inheritdoc}
73+
* @inheritdoc
74+
*
7375
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
7476
*/
7577
public function modifyMeta(array $meta)
7678
{
7779
$meta = $this->removeFixedTierPrice($meta);
78-
$path = $this->arrayManager->findPath(static::CODE_BUNDLE_DATA, $meta, null, 'children');
80+
81+
$groupCode = static::CODE_BUNDLE_DATA;
82+
$path = $this->arrayManager->findPath($groupCode, $meta, null, 'children');
83+
if (empty($path)) {
84+
$meta[$groupCode]['children'] = [];
85+
$meta[$groupCode]['arguments']['data']['config'] = [
86+
'componentType' => Fieldset::NAME,
87+
'label' => __('Bundle Items'),
88+
'collapsible' => true
89+
];
90+
91+
$path = $this->arrayManager->findPath($groupCode, $meta, null, 'children');
92+
}
7993

8094
$meta = $this->arrayManager->merge(
8195
$path,
@@ -220,7 +234,7 @@ private function removeFixedTierPrice(array $meta)
220234
}
221235

222236
/**
223-
* {@inheritdoc}
237+
* @inheritdoc
224238
*/
225239
public function modifyData(array $data)
226240
{

0 commit comments

Comments
 (0)