Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
e47349a
Fixed Purchased Order Form button should visible properly
gelanivishal May 19, 2018
c5d2d77
Minor styles nesting fix
rogyar May 21, 2018
0e87e9e
Merge pull request #1 from hitesh-wagento/2.1-develop-PR-port-15734
hitesh-wagento Jun 5, 2018
9b9cc60
Merge pull request #5 from hitesh-wagento/2.1-develop-PR-port-15792
hitesh-wagento Jun 5, 2018
c261156
resolve Error While Trying To Load Quote Item Collection Using Magent…
neeta-wagento Oct 30, 2017
950e317
Update Collection.php
neeta-wagento Oct 30, 2017
b63d2c5
change for : Resolve Knockout non-unique elements id in console error
viral-wagento Jun 5, 2018
c64228d
ENGCOM-1870: [BackPort] Resolve Knockout non-unique elements id in co…
magento-engcom-team Jun 5, 2018
c95eedc
Move buttons definition to separate file
jissereitsma May 14, 2018
2e5538e
Change relative path to absolute path for testability
jissereitsma May 14, 2018
e4eb4ed
Add strict mode
jissereitsma May 14, 2018
7a49c89
Fix missing comma
jissereitsma May 14, 2018
a30611d
Make sure colons are in right place
jissereitsma May 15, 2018
0852240
Fix missing column because of eslint
jissereitsma May 15, 2018
f8397eb
[Backport] Trim username on customer account login page
dankhrapiyush Jun 6, 2018
950a668
hitesh-wagento Jun 6, 2018
2f13af3
Merge pull request #9 from hitesh-wagento/2.1-develop-PR-port-15878
hitesh-wagento Jun 6, 2018
1c2f385
ENGCOM-1881: [Backport] [Resolved : limiter float too generic] #15880
magento-engcom-team Jun 6, 2018
43835fc
Remove blank line at eof
dankhrapiyush Jun 6, 2018
14721c7
Update comment in trim-username.js
dankhrapiyush Jun 6, 2018
81d8e52
PHPDoc and type hints
May 28, 2018
5b34517
hitesh-wagento Jun 7, 2018
6f7c874
Merge pull request #11 from hitesh-wagento/2.1-develop-PR-port-15914
hitesh-wagento Jun 7, 2018
55f1c88
ENGCOM-1903: [Backport] [Resolved : Changing @tab-content__border var…
magento-engcom-team Jun 7, 2018
fb3141c
ENGCOM-1918: [Backport] Fixed Purchased Order Form button should visi…
magento-engcom-team Jun 7, 2018
936c7de
MAGETWO-86935: [Backport] Restricted User Role gets "Something went w…
OlgaVasyltsun Jun 8, 2018
0922df2
MAGETWO-64616: [BACKPORT] Layout::renderResult() issue
DianaRusin Jun 8, 2018
2fec057
ENGCOM-1926: [Backport] Fixes in catalog component blocks [2.1-develo…
magento-engcom-team Jun 8, 2018
ddf5130
ENGCOM-1930: [Backport-2.1] Trim username on customer account login p…
magento-engcom-team Jun 11, 2018
ea600d6
Merge remote-tracking branch 'origin/MAGETWO-86935' into 2.1-develop-…
DianaRusin Jun 11, 2018
652e97c
MAGETWO-84366: Logo Image Upload is not working in Internet Explorer …
DianaRusin Jun 11, 2018
e00b0ff
MAGETWO-67162: [Backport][GITHUB] CSS Minifying not compatible with C…
OlgaVasyltsun Jun 11, 2018
f794719
Remove unnecessary parameter from invoking toHtml() method
rogyar Jun 11, 2018
caee053
Fixed a minor styling issue in page footer in order to align the colu…
dmytro-ch Jun 11, 2018
a60cd2e
ENGCOM-1947: Fixed a minor styling issue in page footer in order to a…
magento-engcom-team Jun 11, 2018
26d8664
Merge remote-tracking branch 'origin/2.1-develop' into MAGETWO-67162
OlgaVasyltsun Jun 12, 2018
bc26a3a
#13899 Solve Zipcode pattern for Canada
tadeobarranco Mar 2, 2018
8f03ac9
#13899 Improve unit test
tadeobarranco Mar 2, 2018
2587e0f
#13899 Improve unit test
tadeobarranco Mar 2, 2018
e7db130
Fixing failures in the test file
tadeobarranco Mar 2, 2018
fc130fd
Merge pull request #12 from hitesh-wagento/2.1-develop-PR-port-13930
hitesh-wagento Jun 12, 2018
112fb84
ENGCOM-1948: [Backport] #13899 Solve Canada Zip Code pattern #16031
magento-engcom-team Jun 12, 2018
324ee50
added new variables
Karlasa Jun 11, 2018
41b4775
added new primary button variables
Karlasa Jun 11, 2018
c87e8af
checkout page cart icon color fix
Karlasa Jun 11, 2018
7c3ce72
fix for dropdown toggle icon
Karlasa Jun 11, 2018
da1b898
ENGCOM-1955: [Backport] fix for dropdown toggle icon in cart #16043
magento-engcom-team Jun 12, 2018
66e0058
Simplify echo statement
ishakhsuvarov Jun 12, 2018
957b835
ENGCOM-1962: [Backport] Resolve Error While Trying To Load Quote Item…
magento-engcom-team Jun 12, 2018
eab571a
Merge remote-tracking branch 'origin/MAGETWO-84366' into 2.1-develop-…
OlgaVasyltsun Jun 12, 2018
b2c4205
Merge remote-tracking branch 'origin/MAGETWO-64616' into 2.1-develop-…
svitja Jun 12, 2018
a018521
Merge remote-tracking branch 'origin/MAGETWO-67162' into 2.1-develop-…
DianaRusin Jun 12, 2018
e1089a9
Added unit test for captcha string resolver
rogyar Jun 12, 2018
d807c19
ENGCOM-1974: [Backport 2.1] Added unit test for captcha string resolv…
magento-engcom-team Jun 12, 2018
a8289c9
ENGCOM-1950: [Backport 2.1] Wishlist: Remove unnecessary parameter fr…
magento-engcom-team Jun 12, 2018
b710eab
ENGCOM-1955: [Backport] fix for dropdown toggle icon in cart #16043
Jun 12, 2018
7b68ca2
ENGCOM-1950: [Backport 2.1] Wishlist: Remove unnecessary parameter fr…
Jun 12, 2018
486e92c
ENGCOM-1948: [Backport] #13899 Solve Canada Zip Code pattern #16031
Jun 12, 2018
7d2402c
ENGCOM-1947: Fixed a minor styling issue in page footer in order to a…
Jun 12, 2018
5601ed1
ENGCOM-1930: [Backport-2.1] Trim username on customer account login p…
Jun 12, 2018
6b6b3b4
ENGCOM-1926: [Backport] Fixes in catalog component blocks [2.1-develo…
Jun 12, 2018
7a6435a
ENGCOM-1918: [Backport] Fixed Purchased Order Form button should visi…
Jun 12, 2018
1534ac4
ENGCOM-1903: [Backport] [Resolved : Changing @tab-content__border var…
Jun 12, 2018
1a20085
ENGCOM-1881: [Backport] [Resolved : limiter float too generic] #15880
Jun 12, 2018
d659065
Fixed static failures
Jun 12, 2018
7091665
Adding support for variadic arguments fro method in generated proxy c…
May 12, 2018
ea93dfb
ENGCOM-1903: [Backport] [Resolved : Changing @tab-content__border var…
Jun 13, 2018
b91b8f2
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jun 13, 2018
647d83f
ENGCOM-1975: [Backport] Move buttons definition to separate file #15862
magento-engcom-team Jun 13, 2018
477bea4
Merge pull request #2690 from magento-tsg/2.1-develop-pr54
Jun 13, 2018
4d687fe
ENGCOM-1962: [Backport] Resolve Error While Trying To Load Quote Item…
VladimirZaets Jun 13, 2018
958359d
ENGCOM-1870: [BackPort] Resolve Knockout non-unique elements id in co…
VladimirZaets Jun 13, 2018
2097c9b
ENGCOM-1980: Adding support for variadic arguments fro method in gene…
magento-engcom-team Jun 13, 2018
1d129d7
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jun 13, 2018
5977c7f
ENGCOM-1980: Adding support for variadic arguments fro method in gene…
Jun 13, 2018
a969e0c
ENGCOM-1975: [Backport] Move buttons definition to separate file #15862
Jun 13, 2018
f9768b3
fixed word typo
ledian-hymetllari Jun 6, 2018
f6bc135
Merge branch '2.1-develop' of github.com:hitesh-wagento/magento2 into…
hitesh-wagento Jun 14, 2018
9f8a77a
[Correct typo mistake]
hitesh-wagento Jun 14, 2018
e343b0d
Disabling sorting in glob and scandir functions for better performance
Jun 12, 2018
eac6088
ENGCOM-1989: [Backport] Fix issue #15832 #16037
magento-engcom-team Jun 14, 2018
c7a2a46
ENGCOM-1974: [Backport 2.1] Added unit test for captcha string resolv…
Jun 14, 2018
5a04131
Fixed static test failures
Jun 14, 2018
5e12f47
ENGCOM-1992: [Backport] Disabling sorting in glob and scandir functio…
magento-engcom-team Jun 14, 2018
7f20e85
ENGCOM-1997: [Backport] fixed word typo #16102
magento-engcom-team Jun 14, 2018
d031a92
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jun 14, 2018
e7a953b
ENGCOM-1997: [Backport] fixed word typo #16102
Jun 14, 2018
ab31d9d
ENGCOM-1992: [Backport] Disabling sorting in glob and scandir functio…
Jun 14, 2018
e6269c5
ENGCOM-1989: [Backport] Fix issue #15832 #16037
Jun 14, 2018
3a557b6
ENGCOM-2001: [Backport] bugfix checkout page cart icon color #16039
magento-engcom-team Jun 14, 2018
c49b8a4
ENGCOM-2004: [Backport] Correct typo correction js files #16111
magento-engcom-team Jun 15, 2018
88ede62
ENGCOM-2004: [Backport] Correct typo correction js files #16111
Jun 15, 2018
0b1c1c2
Fixed static test failures
Jun 15, 2018
d2494a8
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jun 15, 2018
3606796
Added unit test for CheckRegisterCheckoutObserver
rogyar Jun 15, 2018
b14f8d1
ENGCOM-2014: [Backport 2.1] Captcha: Added unit test for CheckRegiste…
magento-engcom-team Jun 15, 2018
87d207c
ENGCOM-2014: [Backport 2.1] Captcha: Added unit test for CheckRegiste…
Jun 18, 2018
33ae255
ENGCOM-2001: [Backport] bugfix checkout page cart icon color #16039
Jun 18, 2018
deabc3c
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jun 18, 2018
39f6740
Navigation dropdown caret icon.
tejashkumbhare Jun 13, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Captcha\Test\Unit\Observer;

use Magento\Captcha\Helper\Data as CaptchaDataHelper;
use Magento\Captcha\Observer\CaptchaStringResolver;
use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;

class CaptchaStringResolverTest extends \PHPUnit_Framework_TestCase
{
/**
* @var ObjectManager
*/
private $objectManagerHelper;

/**
* @var CaptchaStringResolver
*/
private $captchaStringResolver;

/**
* @var HttpRequest|\PHPUnit_Framework_MockObject_MockObject
*/
private $requestMock;

protected function setUp()
{
$this->objectManagerHelper = new ObjectManager($this);
$this->requestMock = $this->getMock(HttpRequest::class, [], [], '', false);
$this->captchaStringResolver = $this->objectManagerHelper->getObject(CaptchaStringResolver::class);
}

public function testResolveWithFormIdSet()
{
$formId = 'contact_us';
$captchaValue = 'some-value';

$this->requestMock->expects($this->once())
->method('getPost')
->with(CaptchaDataHelper::INPUT_NAME_FIELD_VALUE)
->willReturn([$formId => $captchaValue]);

self::assertEquals(
$this->captchaStringResolver->resolve($this->requestMock, $formId),
$captchaValue
);
}

public function testResolveWithNoFormIdInRequest()
{
$formId = 'contact_us';

$this->requestMock->expects($this->once())
->method('getPost')
->with(CaptchaDataHelper::INPUT_NAME_FIELD_VALUE)
->willReturn([]);

self::assertEquals(
$this->captchaStringResolver->resolve($this->requestMock, $formId),
''
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Captcha\Test\Unit\Observer;

use Magento\Captcha\Model\DefaultModel as CaptchaModel;
use Magento\Captcha\Observer\CheckRegisterCheckoutObserver;
use Magento\Captcha\Helper\Data as CaptchaDataHelper;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\ActionFlag;
use Magento\Captcha\Observer\CaptchaStringResolver;
use Magento\Checkout\Model\Type\Onepage;
use Magento\Framework\App\Request\Http;
use Magento\Framework\App\Response\Http as HttpResponse;
use Magento\Framework\Event\Observer;
use Magento\Framework\Json\Helper\Data as JsonHelper;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Quote\Model\Quote;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CheckRegisterCheckoutObserverTest extends \PHPUnit_Framework_TestCase
{
const FORM_ID = 'register_during_checkout';

/**
* @var CheckRegisterCheckoutObserver
*/
private $checkRegisterCheckoutObserver;

/**
* @var ObjectManager
*/
private $objectManager;

/**
* @var Observer
*/
private $observer;

/**
* @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject
*/
private $responseMock;

/**
* @var HttpResponse|\PHPUnit_Framework_MockObject_MockObject
*/
private $requestMock;

/**
* @var ActionFlag|\PHPUnit_Framework_MockObject_MockObject
*/
private $actionFlagMock;

/**
* @var CaptchaStringResolver|\PHPUnit_Framework_MockObject_MockObject
*/
private $captchaStringResolverMock;

/**
* @var JsonHelper|\PHPUnit_Framework_MockObject_MockObject
*/
private $jsonHelperMock;

/**
* @var CaptchaModel|\PHPUnit_Framework_MockObject_MockObject
*/
private $captchaModelMock;

/**
* @var Quote|\PHPUnit_Framework_MockObject_MockObject
*/
private $quoteModelMock;

/**
* @var Action|\PHPUnit_Framework_MockObject_MockObject
*/
private $controllerMock;

protected function setUp()
{
$onepageModelTypeMock = $this->getMock(Onepage::class, [], [], '', false);
$captchaHelperMock = $this->getMock(CaptchaDataHelper::class, [], [], '', false);
$this->objectManager = new ObjectManager($this);
$this->actionFlagMock = $this->getMock(ActionFlag::class, [], [], '', false);
$this->captchaStringResolverMock = $this->getMock(CaptchaStringResolver::class, [], [], '', false);
$this->captchaModelMock = $this->getMock(CaptchaModel::class, [], [], '', false);
$this->quoteModelMock = $this->getMock(Quote::class, [], [], '', false);
$this->controllerMock = $this->getMock(Action::class, [], [], '', false);
$this->requestMock = $this->getMock(Http::class, [], [], '', false);
$this->responseMock = $this->getMock(HttpResponse::class, [], [], '', false);
$this->jsonHelperMock = $this->getMock(JsonHelper::class, [], [], '', false);
$this->observer = new Observer(['controller_action' => $this->controllerMock]);

$this->checkRegisterCheckoutObserver = $this->objectManager->getObject(
CheckRegisterCheckoutObserver::class,
[
'helper' => $captchaHelperMock,
'actionFlag' => $this->actionFlagMock,
'captchaStringResolver' => $this->captchaStringResolverMock,
'typeOnepage' => $onepageModelTypeMock,
'jsonHelper' => $this->jsonHelperMock
]
);

$captchaHelperMock->expects($this->once())
->method('getCaptcha')
->with(self::FORM_ID)
->willReturn($this->captchaModelMock);
$onepageModelTypeMock->expects($this->once())
->method('getQuote')
->willReturn($this->quoteModelMock);
}

public function testCheckRegisterCheckoutForGuest()
{
$this->quoteModelMock->expects($this->once())
->method('getCheckoutMethod')
->willReturn(Onepage::METHOD_GUEST);
$this->captchaModelMock->expects($this->never())
->method('isRequired');

$this->checkRegisterCheckoutObserver->execute($this->observer);
}

public function testCheckRegisterCheckoutWithNoCaptchaRequired()
{
$this->quoteModelMock->expects($this->once())
->method('getCheckoutMethod')
->willReturn(Onepage::METHOD_REGISTER);
$this->captchaModelMock->expects($this->once())
->method('isRequired')
->willReturn(false);
$this->captchaModelMock->expects($this->never())
->method('isCorrect');

$this->checkRegisterCheckoutObserver->execute($this->observer);
}

public function testCheckRegisterCheckoutWithIncorrectCaptcha()
{
$captchaValue = 'some_word';
$encodedJsonValue = '{}';

$this->quoteModelMock->expects($this->once())
->method('getCheckoutMethod')
->willReturn(Onepage::METHOD_REGISTER);
$this->captchaModelMock->expects($this->once())
->method('isRequired')
->willReturn(true);
$this->controllerMock->expects($this->once())
->method('getRequest')
->willReturn($this->requestMock);
$this->controllerMock->expects($this->once())
->method('getResponse')
->willReturn($this->responseMock);
$this->controllerMock->expects($this->once())
->method('getResponse')
->willReturn($this->responseMock);
$this->captchaStringResolverMock->expects($this->once())
->method('resolve')
->with($this->requestMock, self::FORM_ID)
->willReturn($captchaValue);
$this->captchaModelMock->expects($this->once())
->method('isCorrect')
->with($captchaValue)
->willReturn(false);
$this->actionFlagMock->expects($this->once())
->method('set')
->with('', Action::FLAG_NO_DISPATCH, true);
$this->jsonHelperMock->expects($this->once())
->method('jsonEncode')
->willReturn($encodedJsonValue);
$this->responseMock->expects($this->once())
->method('representJson')
->with($encodedJsonValue);

$this->checkRegisterCheckoutObserver->execute($this->observer);
}

public function testCheckRegisterCheckoutWithCorrectCaptcha()
{
$this->quoteModelMock->expects($this->once())
->method('getCheckoutMethod')
->willReturn(Onepage::METHOD_REGISTER);
$this->captchaModelMock->expects($this->once())
->method('isRequired')
->willReturn(true);
$this->controllerMock->expects($this->once())
->method('getRequest')
->willReturn($this->requestMock);
$this->captchaStringResolverMock->expects($this->once())
->method('resolve')
->with($this->requestMock, self::FORM_ID)
->willReturn('some_word');
$this->captchaModelMock->expects($this->once())
->method('isCorrect')
->with('some_word')
->willReturn(true);
$this->actionFlagMock->expects($this->never())
->method('set');

$this->checkRegisterCheckoutObserver->execute($this->observer);
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName)
*
* @param Node|array $node
* @param int $level
* @return string
* @return array
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function (node, e) {
*
* @param \Magento\Framework\Data\Tree\Node|array $node
* @param int $level
* @return string
* @return array
*/
protected function _getNodeJson($node, $level = 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme
/**
* Retrieve data object related with form
*
* @return \Magento\Catalog\Model\Product || \Magento\Catalog\Model\Category
* @return \Magento\Catalog\Model\Product|\Magento\Catalog\Model\Category
*/
public function getDataObject()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ protected function _prepareColumns()
'type' => 'options',
'options' => ['1' => __('Yes'), '0' => __('No')],
'align' => 'center'
],
'is_user_defined'
]
);

$this->_eventManager->dispatch('product_attribute_grid_build', ['grid' => $this]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getSelectorOptions()
*
* @param string $labelPart
* @param int $templateId
* @return \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection
* @return array
*/
public function getSuggestedAttributes($labelPart, $templateId = null)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function isRssAllowed()
}

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Category/Rss/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getLabel()
}

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Product/AbstractProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function getAddToCompareUrl()
* Gets minimal sales quantity
*
* @param \Magento\Catalog\Model\Product $product
* @return int|null
* @return float|null
*/
public function getMinimalQty($product)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function getPrice($price, $includingTax = null)
* Returns price converted to current currency rate
*
* @param float $price
* @return float
* @return float|string
*/
public function getCurrencyPrice($price)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Rss/Product/Special.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function _construct()
}

/**
* @return string
* @return array
*/
public function getRssData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<form data-hasrequired="* Required Fields">
<fieldset id="billing-new-address-form" class="fieldset address">
<fieldset data-bind="attr: { id:'billing-new-address-form-'+index, value:index}" class="fieldset address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
Expand Down
10 changes: 10 additions & 0 deletions app/code/Magento/Customer/view/frontend/templates/form/login.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,13 @@
</form>
</div>
</div>

<script type="text/x-magento-init">
{
".field.email": {
"Magento_Customer/js/trim-username": {
"formSelector": "form.form-login"
}
}
}
</script>
Loading