Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 36aec4b

Browse files
Merge pull request #46 from magento-epam/2.3-develop
Merge
2 parents a894b77 + 1cb9235 commit 36aec4b

File tree

152 files changed

+1915
-266
lines changed

Some content is hidden

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

152 files changed

+1915
-266
lines changed

app/code/Magento/Backend/Block/System/Store/Delete/Group.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function _prepareLayout()
1919
{
2020
$itemId = $this->getRequest()->getParam('group_id');
2121

22-
$this->setTemplate('system/store/delete_group.phtml');
22+
$this->setTemplate('Magento_Backend::system/store/delete_group.phtml');
2323
$this->setAction($this->getUrl('adminhtml/*/deleteGroupPost', ['group_id' => $itemId]));
2424
$this->addChild(
2525
'confirm_deletion_button',

app/code/Magento/Backend/Block/System/Store/Delete/Website.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function _prepareLayout()
1919
{
2020
$itemId = $this->getRequest()->getParam('website_id');
2121

22-
$this->setTemplate('system/store/delete_website.phtml');
22+
$this->setTemplate('Magento_Backend::system/store/delete_website.phtml');
2323
$this->setAction($this->getUrl('adminhtml/*/deleteWebsitePost', ['website_id' => $itemId]));
2424
$this->addChild(
2525
'confirm_deletion_button',

app/code/Magento/Backend/Helper/Dashboard/Order.php

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @api
1414
* @since 100.0.2
1515
*/
16-
class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
16+
class Order extends AbstractDashboard
1717
{
1818
/**
1919
* @var \Magento\Reports\Model\ResourceModel\Order\Collection
@@ -29,32 +29,25 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
2929
/**
3030
* @param \Magento\Framework\App\Helper\Context $context
3131
* @param \Magento\Reports\Model\ResourceModel\Order\Collection $orderCollection
32+
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
3233
*/
3334
public function __construct(
3435
\Magento\Framework\App\Helper\Context $context,
35-
\Magento\Reports\Model\ResourceModel\Order\Collection $orderCollection
36+
\Magento\Reports\Model\ResourceModel\Order\Collection $orderCollection,
37+
\Magento\Store\Model\StoreManagerInterface $storeManager = null
3638
) {
3739
$this->_orderCollection = $orderCollection;
38-
parent::__construct($context);
39-
}
40+
$this->_storeManager = $storeManager ?: ObjectManager::getInstance()
41+
->get(\Magento\Store\Model\StoreManagerInterface::class);
4042

41-
/**
42-
* The getter function to get the new StoreManager dependency
43-
*
44-
* @return \Magento\Store\Model\StoreManagerInterface
45-
*
46-
* @deprecated 100.1.0
47-
*/
48-
private function getStoreManager()
49-
{
50-
if ($this->_storeManager === null) {
51-
$this->_storeManager = ObjectManager::getInstance()->get(\Magento\Store\Model\StoreManagerInterface::class);
52-
}
53-
return $this->_storeManager;
43+
parent::__construct($context);
5444
}
5545

5646
/**
5747
* @return void
48+
*
49+
* @throws \Magento\Framework\Exception\LocalizedException
50+
* @throws \Magento\Framework\Exception\NoSuchEntityException
5851
*/
5952
protected function _initCollection()
6053
{
@@ -65,15 +58,15 @@ protected function _initCollection()
6558
if ($this->getParam('store')) {
6659
$this->_collection->addFieldToFilter('store_id', $this->getParam('store'));
6760
} elseif ($this->getParam('website')) {
68-
$storeIds = $this->getStoreManager()->getWebsite($this->getParam('website'))->getStoreIds();
61+
$storeIds = $this->_storeManager->getWebsite($this->getParam('website'))->getStoreIds();
6962
$this->_collection->addFieldToFilter('store_id', ['in' => implode(',', $storeIds)]);
7063
} elseif ($this->getParam('group')) {
71-
$storeIds = $this->getStoreManager()->getGroup($this->getParam('group'))->getStoreIds();
64+
$storeIds = $this->_storeManager->getGroup($this->getParam('group'))->getStoreIds();
7265
$this->_collection->addFieldToFilter('store_id', ['in' => implode(',', $storeIds)]);
7366
} elseif (!$this->_collection->isLive()) {
7467
$this->_collection->addFieldToFilter(
7568
'store_id',
76-
['eq' => $this->getStoreManager()->getStore(\Magento\Store\Model\Store::ADMIN_CODE)->getId()]
69+
['eq' => $this->_storeManager->getStore(\Magento\Store\Model\Store::ADMIN_CODE)->getId()]
7770
);
7871
}
7972
$this->_collection->load();
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
11+
<actionGroup name="GoToUserRoles">
12+
<click selector="#menu-magento-backend-system" stepKey="clickOnSystemIcon"/>
13+
<waitForPageLoad stepKey="waitForSystemsPageToOpen"/>
14+
<click selector="//span[contains(text(), 'User Roles')]" stepKey="clickToSelectUserRoles"/>
15+
<waitForPageLoad stepKey="waitForUserRolesPageToOpen"/>
16+
</actionGroup>
17+
18+
<!--Create new role-->
19+
<actionGroup name="AdminCreateRole">
20+
<arguments>
21+
<argument name="role" type="string" defaultValue=""/>
22+
<argument name="resource" type="string" defaultValue="All"/>
23+
<argument name="scope" type="string" defaultValue="Custom"/>
24+
<argument name="websites" type="string" defaultValue="Main Website"/>
25+
</arguments>
26+
<click selector="{{AdminCreateRoleSection.create}}" stepKey="clickToAddNewRole"/>
27+
<fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{role.name}}" stepKey="setRoleName"/>
28+
<fillField stepKey="setPassword" selector="{{AdminCreateRoleSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
29+
<click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/>
30+
<waitForPageLoad stepKey="waitForRoleResourcePage" time="5"/>
31+
<click stepKey="checkSales" selector="//a[text()='Sales']"/>
32+
<click selector="{{AdminCreateRoleSection.save}}" stepKey="clickToSaveRole"/>
33+
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
34+
<see userInput="You saved the role." stepKey="seeSuccessMessage" />
35+
</actionGroup>
36+
37+
38+
<!--Delete role-->
39+
<actionGroup name="AdminDeleteRoleActionGroup">
40+
<arguments>
41+
<argument name="role" defaultValue=""/>
42+
</arguments>
43+
<click stepKey="clickOnRole" selector="{{AdminDeleteRoleSection.theRole}}"/>
44+
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteRoleSection.current_pass}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
45+
<click stepKey="clickToDeleteRole" selector="{{AdminDeleteRoleSection.delete}}"/>
46+
<waitForAjaxLoad stepKey="waitForDeleteConfirmationPopup" time="5"/>
47+
<click stepKey="clickToConfirm" selector="{{AdminDeleteRoleSection.confirm}}"/>
48+
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
49+
<see stepKey="seeSuccessMessage" userInput="You deleted the role."/>
50+
</actionGroup>
51+
</actionGroups>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
11+
<!--Go to all users-->
12+
<actionGroup name="GoToAllUsers">
13+
<click selector="{{AdminCreateUserSection.system}}" stepKey="clickOnSystemIcon"/>
14+
<waitForPageLoad stepKey="waitForSystemsPageToOpen"/>
15+
<click selector="{{AdminCreateUserSection.allUsers}}" stepKey="clickToSelectUserRoles"/>
16+
<waitForPageLoad stepKey="waitForUserRolesPageToOpen"/>
17+
</actionGroup>
18+
19+
<!--Create new user with specified role-->
20+
<actionGroup name="AdminCreateUser">
21+
<click selector="{{AdminCreateUserSection.create}}" stepKey="clickToCreateNewUser"/>
22+
<waitForPageLoad stepKey="waitForNewUserPageLoad" time="10"/>
23+
<fillField selector="{{AdminCreateUserSection.usernameTextField}}" userInput="{{NewAdmin.username}}" stepKey="enterUserName" />
24+
<fillField selector="{{AdminCreateUserSection.firstNameTextField}}" userInput="{{NewAdmin.firstName}}" stepKey="enterFirstName" />
25+
<fillField selector="{{AdminCreateUserSection.lastNameTextField}}" userInput="{{NewAdmin.lastName}}" stepKey="enterLastName" />
26+
<fillField selector="{{AdminCreateUserSection.emailTextField}}" userInput="{{NewAdmin.email}}" stepKey="enterEmail" />
27+
<fillField selector="{{AdminCreateUserSection.passwordTextField}}" userInput="{{NewAdmin.password}}" stepKey="enterPassword" />
28+
<fillField selector="{{AdminCreateUserSection.pwConfirmationTextField}}" userInput="{{NewAdmin.password}}" stepKey="confirmPassword" />
29+
<fillField selector="{{AdminCreateUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="enterCurrentPassword" />
30+
<scrollToTopOfPage stepKey="scrollToTopOfPage" />
31+
<click selector="{{AdminCreateUserSection.userRoleTab}}" stepKey="clickUserRole" />
32+
<waitForAjaxLoad stepKey="waitForRoles" time="5"/>
33+
<fillField selector="{{AdminCreateRoleSection.roleNameFilterTextField}}" userInput="{{role.name}}" stepKey="filterRole" />
34+
<click selector="{{AdminCreateRoleSection.searchButton}}" stepKey="clickSearch" />
35+
<waitForPageLoad stepKey="waitForSearch" time="10"/>
36+
<click selector="{{AdminCreateRoleSection.searchResultFirstRow}}" stepKey="selectRole" />
37+
<click selector="{{AdminCreateUserSection.saveButton}}" stepKey="clickSaveUser" />
38+
<waitForPageLoad stepKey="waitForSaveUser" time="10"/>
39+
<see userInput="You saved the user." stepKey="seeSuccessMessage" />
40+
</actionGroup>
41+
42+
43+
<!--Delete User-->
44+
<actionGroup name="AdminDeleteUserActionGroup">
45+
46+
<click stepKey="clickOnUser" selector="{{AdminDeleteUserSection.theUser}}"/>
47+
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteUserSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
48+
<scrollToTopOfPage stepKey="scrollToTop"/>
49+
<click stepKey="clickToDeleteUser" selector="{{AdminDeleteUserSection.delete}}"/>
50+
<waitForPageLoad stepKey="waitForDeletePopupOpen" time="5"/>
51+
<click stepKey="clickToConfirm" selector="{{AdminDeleteUserSection.confirm}}"/>
52+
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
53+
<see userInput="You deleted the user." stepKey="seeSuccessMessage" />
54+
</actionGroup>
55+
56+
</actionGroups>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
11+
<actionGroup name="ConfigureBraintree">
12+
<!-- GoTo ConfigureBraintree fields -->
13+
<click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
14+
<waitForPageLoad stepKey="waitForConfiguration" time="2"/>
15+
<click stepKey="clickOnConfigurations" selector="{{StoresSubmenuSection.configuration}}" />
16+
<waitForPageLoad stepKey="waitForSales" time="2"/>
17+
<click stepKey="clickOnSales" selector="{{ConfigurationListSection.sales}}" />
18+
<waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>
19+
<click stepKey="clickOnPaymentMethods" selector="{{ConfigurationListSection.salesPaymentMethods}}" />
20+
<waitForPageLoad stepKey="waitForConfigureButton" time="2"/>
21+
<click stepKey="clickOnConfigureButtonForBraintree" selector="{{ConfigurationPaymentSection.configureButton}}" />
22+
<waitForPageLoad stepKey="BraintreeSettings" time="2"/>
23+
24+
<!-- Fill Braintree fields -->
25+
<fillField stepKey="fillTitleForBraintreeSettings" selector="{{BraintreeConfiguraionSection.titleForBraintreeSettings}}" userInput="{{BraintreeConfigurationData.title}}"/>
26+
<click stepKey="openEnvironmentSelect" selector="{{BraintreeConfiguraionSection.environment}}"/>
27+
<click stepKey="chooseEnvironment" selector="{{BraintreeConfiguraionSection.sandbox}}"/>
28+
<click stepKey="openPaymentActionSelect" selector="{{BraintreeConfiguraionSection.paymentActionSelect}}"/>
29+
<click stepKey="choosePaymentAction" selector="{{BraintreeConfiguraionSection.paymentAction}}"/>
30+
<fillField stepKey="fillMerchantID" selector="{{BraintreeConfiguraionSection.merchantID}}" userInput="{{BraintreeConfigurationData.merchantID}}"/>
31+
<fillField stepKey="fillPublicKey" selector="{{BraintreeConfiguraionSection.publicKey}}" userInput="{{BraintreeConfigurationData.publicKey}}"/>
32+
<fillField stepKey="fillPrivateKey" selector="{{BraintreeConfiguraionSection.privateKey}}" userInput="{{BraintreeConfigurationData.privateKey}}"/>
33+
<click stepKey="expandEnableThisSolution" selector="{{BraintreeConfiguraionSection.enableThisSolution}}"/>
34+
<click stepKey="chooseYesForEnableThisSolution" selector="{{BraintreeConfiguraionSection.yesForEnable}}"/>
35+
<click stepKey="expandEnablePayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.payPalThroughBraintree}}"/>
36+
<click stepKey="chooseYesForEnablePayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.yesForPayPalThroughBraintree}}"/>
37+
<click stepKey="expandAdvancedBraintreeSettings" selector="{{BraintreeConfiguraionSection.advancedBraintreeSettings}}"/>
38+
<fillField stepKey="fillMerchantAccountID" selector="{{BraintreeConfiguraionSection.merchantAccountID}}" userInput="{{BraintreeConfigurationData.merchantAccountID}}"/>
39+
<click stepKey="expandCVVVerification" selector="{{BraintreeConfiguraionSection.CVVVerification}}"/>
40+
<click stepKey="chooseYes" selector="{{BraintreeConfiguraionSection.yesForCVV}}"/>
41+
<click stepKey="expandPayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.payPalThroughBraintreeSelector}}"/>
42+
<fillField stepKey="fillTitleForPayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.titleForPayPalThroughBraintree}}" userInput="{{BraintreeConfigurationData.titleForPayPalThroughBraintree}}"/>
43+
<click stepKey="expandPaymentAction" selector="{{BraintreeConfiguraionSection.paymentActionInPayPal}}"/>
44+
<click stepKey="chooseAuthorize" selector="{{BraintreeConfiguraionSection.actionAuthorize}}"/>
45+
<click stepKey="save" selector="{{BraintreeConfiguraionSection.save}}"/>
46+
<waitForElementVisible selector="{{BraintreeConfiguraionSection.successfulMessage}}" stepKey="waitForSuccessfullyConfigured" time="10"/>
47+
</actionGroup>
48+
49+
</actionGroups>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="CreateCustomerActionGroup">
11+
<click stepKey="openCustomers" selector="{{AdminMenuSection.customers}}"/>
12+
<waitForAjaxLoad stepKey="waitForCatalogSubmenu" time="5"/>
13+
<click stepKey="clickOnAllCustomers" selector="{{CustomersSubmenuSection.allCustomers}}"/>
14+
<waitForPageLoad stepKey="waitForProductsPage" time="10"/>
15+
<click stepKey="addNewCustomer" selector="{{CustomersPageSection.addNewCustomerButton}}"/>
16+
<waitForPageLoad stepKey="waitForNewProductPage" time="10"/>
17+
<click stepKey="AssociateToWebsite" selector="{{NewCustomerPageSection.associateToWebsite}}"/>
18+
<click stepKey="Group" selector="{{NewCustomerPageSection.group}}"/>
19+
<fillField stepKey="FillFirstName" selector="{{NewCustomerPageSection.firstName}}" userInput="{{NewCustomerData.FirstName}}"/>
20+
<fillField stepKey="FillLastName" selector="{{NewCustomerPageSection.lastName}}" userInput="{{NewCustomerData.LastName}}"/>
21+
<fillField stepKey="FillEmail" selector="{{NewCustomerPageSection.email}}" userInput="{{NewCustomerData.Email}}"/>
22+
<scrollToTopOfPage stepKey="scrollToAddresses"/>
23+
<click stepKey="goToAddresses" selector="{{NewCustomerPageSection.addresses}}"/>
24+
<waitForAjaxLoad stepKey="waitForAddresses" time="5"/>
25+
<click stepKey="AddNewAddress" selector="{{NewCustomerPageSection.addNewAddress}}"/>
26+
<waitForPageLoad stepKey="waitForAddressFields" time="5"/>
27+
<click stepKey="thickBillingAddress" selector="{{NewCustomerPageSection.defaultBillingAddress}}"/>
28+
<click stepKey="thickShippingAddress" selector="{{NewCustomerPageSection.defaultShippingAddress}}"/>
29+
<fillField stepKey="fillFirstNameForAddress" selector="{{NewCustomerPageSection.firstNameForAddress}}" userInput="{{NewCustomerData.AddressFirstName}}"/>
30+
<fillField stepKey="fillLastNameForAddress" selector="{{NewCustomerPageSection.lastNameForAddress}}" userInput="{{NewCustomerData.AddressLastName}}"/>
31+
<fillField stepKey="fillStreetAddress" selector="{{NewCustomerPageSection.streetAddress}}" userInput="{{NewCustomerData.StreetAddress}}"/>
32+
<fillField stepKey="fillCity" selector="{{NewCustomerPageSection.city}}" userInput="{{NewCustomerData.City}}"/>
33+
<click stepKey="openCountry" selector="{{NewCustomerPageSection.country}}"/>
34+
<waitForAjaxLoad stepKey="waitForCountryList" time="5"/>
35+
<click stepKey="chooseCountry" selector="{{NewCustomerPageSection.countryArmenia}}"/>
36+
<fillField stepKey="fillZip" selector="{{NewCustomerPageSection.zip}}" userInput="{{NewCustomerData.Zip}}"/>
37+
<fillField stepKey="fillPhoneNumber" selector="{{NewCustomerPageSection.phoneNumber}}" userInput="{{NewCustomerData.PhoneNumber}}"/>
38+
<waitForPageLoad stepKey="wait" time="10"/>
39+
<click stepKey="save" selector="{{NewCustomerPageSection.saveCustomer}}"/>
40+
<waitForPageLoad stepKey="waitForCustomersPage" time="10"/>
41+
<waitForElementVisible selector="{{NewCustomerPageSection.createdSuccessMessage}}" stepKey="waitForSuccessfullyCreatedMessage" time="20"/>
42+
43+
</actionGroup>
44+
</actionGroups>

0 commit comments

Comments
 (0)