Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/2.3-develop' into 2.3-developP…
Browse files Browse the repository at this point in the history
…R21425
  • Loading branch information
nmalevanec committed Feb 28, 2019
2 parents 68ee3af + 61e17e5 commit 8e95bfd
Show file tree
Hide file tree
Showing 283 changed files with 8,808 additions and 2,739 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
<methods>
<method name="authorizenet_acceptjs">
<allow_multiple_address>1</allow_multiple_address>
<allow_multiple_address>0</allow_multiple_address>
</method>
</methods>
</payment>
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
*/

var config = {
shim: {
acceptjs: {
exports: 'Accept'
},
acceptjssandbox: {
exports: 'Accept'
map: {
'*': {
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept.js',
acceptjs: 'https://js.authorize.net/v1/Accept.js'
}
},
paths: {
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept',
acceptjs: 'https://js.authorize.net/v1/Accept'
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define([
dependency = 'acceptjssandbox';
}

require([dependency], function (accept) {
require([dependency], function () {
var $body = $('body');

/*
Expand All @@ -26,7 +26,16 @@ define([
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
*/
$body.on('handshake.acceptjs', function () {
deferred.resolve(accept);
/*
* Accept.js doesn't return the library when loading
* and requirejs "shim" can't be used because it only works with the "paths" config option
* and we can't use "paths" because require will try to load ".min.js" in production
* and that doesn't work because it doesn't exist
* and we can't add a query string to force a URL because accept.js will reject it
* and we can't include it locally because they check in the script before loading more scripts
* So, we use the global version as "shim" would
*/
deferred.resolve(window.Accept);
$body.off('handshake.acceptjs');
});
},
Expand Down
9 changes: 5 additions & 4 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @api
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @since 100.0.2
*/
class Context extends \Magento\Framework\View\Element\Template\Context
Expand Down Expand Up @@ -174,7 +175,7 @@ public function getAuthorization()
}

/**
* Get Backend Session
* Get backend session instance.
*
* @return \Magento\Backend\Model\Session
*/
Expand All @@ -184,7 +185,7 @@ public function getBackendSession()
}

/**
* Get Math Random
* Get math random instance.
*
* @return \Magento\Framework\Math\Random
*/
Expand All @@ -194,7 +195,7 @@ public function getMathRandom()
}

/**
* Get Form Key
* Get form key instance.
*
* @return \Magento\Framework\Data\Form\FormKey
*/
Expand All @@ -204,7 +205,7 @@ public function getFormKey()
}

/**
* Get Class Name Builder
* Get name builder instance.
*
* @return \Magento\Framework\Code\NameBuilder
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
protected $_column;

/**
* Set column for renderer.
*
* @param Column $column
* @return $this
*/
Expand All @@ -38,6 +40,8 @@ public function setColumn($column)
}

/**
* Returns row associated with the renderer.
*
* @return Column
*/
public function getColumn()
Expand All @@ -48,7 +52,7 @@ public function getColumn()
/**
* Renders grid column
*
* @param Object $row
* @param DataObject $row
* @return string
*/
public function render(DataObject $row)
Expand All @@ -66,7 +70,7 @@ public function render(DataObject $row)
/**
* Render column for export
*
* @param Object $row
* @param DataObject $row
* @return string
*/
public function renderExport(DataObject $row)
Expand All @@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
}

/**
* @param Object $row
* Returns value of the row.
*
* @param DataObject $row
* @return mixed
*/
protected function _getValue(DataObject $row)
Expand All @@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
}

/**
* @param Object $row
* Get pre-rendered input element.
*
* @param DataObject $row
* @return string
*/
public function _getInputValueElement(DataObject $row)
Expand All @@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
}

/**
* @param Object $row
* Get input value by row.
*
* @param DataObject $row
* @return mixed
*/
protected function _getInputValue(DataObject $row)
Expand All @@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
}

/**
* Renders header of the column,
*
* @return string
*/
public function renderHeader()
Expand Down Expand Up @@ -148,6 +160,8 @@ public function renderHeader()
}

/**
* Render HTML properties.
*
* @return string
*/
public function renderProperty()
Expand All @@ -172,6 +186,8 @@ public function renderProperty()
}

/**
* Returns HTML for CSS.
*
* @return string
*/
public function renderCss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
*/
namespace Magento\Backend\Controller\Adminhtml\Dashboard;

class ProductsViewed extends AjaxBlock
use Magento\Framework\App\Action\HttpGetActionInterface;

/**
* Get most viewed products controller.
*/
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
{
/**
* Gets most viewed products list
*
* @return \Magento\Backend\Model\View\Result\Page
* @return \Magento\Framework\Controller\Result\Raw
*/
public function execute()
{
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Backup/Controller/Adminhtml/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
namespace Magento\Backup\Controller\Adminhtml;

use Magento\Backend\App\Action;
use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Backup\Helper\Data as Helper;
use Magento\Framework\App\ObjectManager;

Expand All @@ -18,7 +17,7 @@
* @since 100.0.2
* @SuppressWarnings(PHPMD.AllPurposeAction)
*/
abstract class Index extends Action implements HttpGetActionInterface
abstract class Index extends Action
{
/**
* Authorization level of a basic admin session
Expand Down
7 changes: 5 additions & 2 deletions app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Backup\Controller\Adminhtml\Index;

use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem;

class Create extends \Magento\Backup\Controller\Adminhtml\Index
/**
* Create backup controller
*/
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
{
/**
* Create backup action.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Catalog\Controller\Adminhtml\Product;

class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product
use Magento\Framework\App\Action\HttpGetActionInterface;

/**
* Get specified tab grid controller.
*/
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface
{
/**
* @var \Magento\Framework\Controller\Result\RawFactory
Expand Down Expand Up @@ -47,7 +51,7 @@ public function execute()
$this->productBuilder->build($this->getRequest());

$block = $this->getRequest()->getParam('gridOnlyBlock');
$blockClassSuffix = str_replace(' ', '_', ucwords(str_replace('_', ' ', $block)));
$blockClassSuffix = ucwords($block, '_');

/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
$resultRaw = $this->resultRawFactory->create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,15 @@
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
</actionGroup>

<actionGroup name="AdminAssignProductToCategory">
<arguments>
<argument name="productId" type="string"/>
<argument name="categoryName" type="string"/>
</arguments>
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="amOnPage"/>
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{categoryName}}]" stepKey="selectCategory"/>
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,66 @@
<waitForPageLoad stepKey="waitForAttributeToSave"/>
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
</actionGroup>

<!--Clicks Add Attribute and adds the given attribute-->
<actionGroup name="addProductAttributeInProductModal">
<arguments>
<argument name="attributeCode" type="string"/>
</arguments>
<click stepKey="addAttribute" selector="{{AdminProductFormActionSection.addAttributeButton}}"/>
<conditionalClick selector="{{AdminProductAddAttributeModalSection.clearFilters}}" dependentSelector="{{AdminProductAddAttributeModalSection.clearFilters}}" visible="true" stepKey="clearFilters"/>
<click stepKey="clickFilters" selector="{{AdminProductAddAttributeModalSection.filters}}"/>
<fillField stepKey="fillCode" selector="{{AdminProductAddAttributeModalSection.attributeCodeFilter}}" userInput="{{attributeCode}}"/>
<click stepKey="clickApply" selector="{{AdminProductAddAttributeModalSection.applyFilters}}"/>
<waitForPageLoad stepKey="waitForFilters"/>
<checkOption selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}" stepKey="checkAttribute"/>
<click stepKey="addSelected" selector="{{AdminProductAddAttributeModalSection.addSelected}}"/>
</actionGroup>

<!--Clicks createNewAttribute and fills out form-->
<actionGroup name="createProductAttribute">
<arguments>
<argument name="attribute" type="entity" defaultValue="productAttributeWysiwyg"/>
</arguments>
<click stepKey="createNewAttribute" selector="{{AdminProductAttributeGridSection.createNewAttributeBtn}}"/>
<fillField stepKey="fillDefaultLabel" selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{attribute.attribute_code}}"/>
<selectOption selector="{{AttributePropertiesSection.InputType}}" stepKey="checkInputType" userInput="{{attribute.frontend_input}}"/>
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" stepKey="checkRequired" userInput="{{attribute.is_required_admin}}"/>
<click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/>
</actionGroup>

<!-- Inputs text default value and attribute code-->
<actionGroup name="createProductAttributeWithTextField" extends="createProductAttribute" insertAfter="checkRequired">
<click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/>
<fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/>
<fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueText}}" userInput="{{attribute.default_value}}"/>
</actionGroup>

<!-- Inputs date default value and attribute code-->
<actionGroup name="createProductAttributeWithDateField" extends="createProductAttribute" insertAfter="checkRequired">
<arguments>
<argument name="date" type="string"/>
</arguments>
<click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/>
<fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/>
<fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueDate}}" userInput="{{date}}"/>
</actionGroup>

<!-- Creates dropdown option at row without saving-->
<actionGroup name="createAttributeDropdownNthOption">
<arguments>
<argument name="row" type="string"/>
<argument name="adminName" type="string"/>
<argument name="frontName" type="string"/>
</arguments>
<click stepKey="clickAddOptions" selector="{{AttributePropertiesSection.dropdownAddOptions}}"/>
<waitForPageLoad stepKey="waitForNewOption"/>
<fillField stepKey="fillAdmin" selector="{{AttributePropertiesSection.dropdownNthOptionAdmin(row)}}" userInput="{{adminName}}"/>
<fillField stepKey="fillStoreView" selector="{{AttributePropertiesSection.dropdownNthOptionDefaultStoreView(row)}}" userInput="{{frontName}}"/>
</actionGroup>

<!-- Creates dropdown option at row as default-->
<actionGroup name="createAttributeDropdownNthOptionAsDefault" extends="createAttributeDropdownNthOption">
<checkOption selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault(row)}}" stepKey="setAsDefault" after="fillStoreView"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@
<waitForPageLoad stepKey="waitForUserInput"/>
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
</actionGroup>
<actionGroup name="FilterProductAttributeSetGridByAttributeSetName">
<arguments>
<argument name="name" type="string"/>
</arguments>
<click selector="{{AdminProductAttributeSetGridSection.resetFilter}}" stepKey="clickResetButton"/>
<fillField selector="{{AdminProductAttributeSetGridSection.filter}}" userInput="{{name}}" stepKey="filterByName"/>
<click selector="{{AdminProductAttributeSetGridSection.searchBtn}}" stepKey="clickSearch"/>
<click selector="{{AdminProductAttributeSetGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
<waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
</actionGroup>
</actionGroups>
6 changes: 6 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,10 @@
<data key="is_active">false</data>
<data key="include_in_menu">true</data>
</entity>
<entity name="CatInactiveNotInMenu" type="category">
<data key="name" unique="suffix">InactiveNotInMenu</data>
<data key="name_lwr" unique="suffix">inactivenotinmenu</data>
<data key="is_active">false</data>
<data key="include_in_menu">false</data>
</entity>
</entities>
Loading

0 comments on commit 8e95bfd

Please sign in to comment.