Skip to content

Commit 524f967

Browse files
committed
Merge branch '2.3-develop' of github.com:magento/magento2ce into MQE-1393-New-Customer-Action-Group
2 parents 0db7c01 + beb0274 commit 524f967

File tree

272 files changed

+4736
-1103
lines changed

Some content is hidden

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

272 files changed

+4736
-1103
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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@
1616
</actionGroup>
1717

1818
<!--Create new role-->
19-
<actionGroup name="AdminCreateRole">
19+
<actionGroup name="AdminCreateNewRole">
2020
<arguments>
2121
<argument name="role" type="string" defaultValue=""/>
2222
<argument name="resource" type="string" defaultValue="All"/>
23+
<argument name="scope" type="string" defaultValue="Custom"/>
24+
<argument name="websites" type="string" defaultValue="Main Website"/>
2325
</arguments>
2426
<click selector="{{AdminCreateRoleSection.create}}" stepKey="clickToAddNewRole"/>
2527
<fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{role.name}}" stepKey="setRoleName"/>
2628
<fillField stepKey="setPassword" selector="{{AdminCreateRoleSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
2729
<click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/>
2830
<waitForPageLoad stepKey="waitForRoleResourcePage" time="5"/>
29-
<click selector="{{AdminCreateRoleSection.roleScope}}" stepKey="clickToExpandScopeAccess"/>
30-
<click selector="{{AdminCreateRoleSection.scopeValue(resource)}}" stepKey="clickToSelectScopeAccess"/>
31+
<click stepKey="checkSales" selector="//a[text()='Sales']"/>
3132
<click selector="{{AdminCreateRoleSection.save}}" stepKey="clickToSaveRole"/>
3233
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
3334
<see userInput="You saved the role." stepKey="seeSuccessMessage" />

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
@@ -40,9 +40,9 @@
4040
</actionGroup>
4141

4242
<!--Delete User-->
43-
<actionGroup name="AdminDeleteUserActionGroup">
43+
<actionGroup name="AdminDeleteNewUserActionGroup">
44+
4445
<click stepKey="clickOnUser" selector="{{AdminDeleteUserSection.theUser}}"/>
45-
<waitForPageLoad stepKey="waitForUserPageToLoad"/>
4646
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteUserSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
4747
<scrollToTopOfPage stepKey="scrollToTop"/>
4848
<click stepKey="clickToDeleteUser" selector="{{AdminDeleteUserSection.delete}}"/>
@@ -51,4 +51,5 @@
5151
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
5252
<see userInput="You deleted the user." stepKey="seeSuccessMessage" />
5353
</actionGroup>
54+
5455
</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)