Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #15986: Added unit test for CaptchaStringResolver (by @rogyar)
 - #15644: [Forwardport] Fixed Purchased Order Form button should visible properly (by @vgelani)
 - #15768: [Forwardport] FIX for issue #15457 - Bundle Products price range is showing expired� (by @sanjay-wagento)
 - #15766: [Forwardport] FIX fo rissue #15510 - First PDF download / export after login (by @sanjay-wagento)


Fixed GitHub Issues:
 - #15457: Bundle Products price range is showing expired special price from bundle options (reported by @harleen-mann) has been fixed in #15768 by @sanjay-wagento in 2.3-develop branch
   Related commits:
     1. e13f1f0

 - #15510: First PDF download / export after login (reported by @anthony-jullien) has been fixed in #15766 by @sanjay-wagento in 2.3-develop branch
   Related commits:
     1. d58ab5f
  • Loading branch information
magento-engcom-team authored Jun 12, 2018
2 parents 02aaccb + c9fc88f commit ff6e0b8
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/code/Magento/Backend/App/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
$this->_view->loadLayout(['default', 'adminhtml_denied'], true, true, false);
$this->_view->renderLayout();
$this->_request->setDispatched(true);

return $this->_response;
}

Expand All @@ -226,6 +227,11 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)

$this->_processLocaleSettings();

// Need to preload isFirstPageAfterLogin (see https://github.com/magento/magento2/issues/15510)
if ($this->_auth->isLoggedIn()) {
$this->_auth->getAuthStorage()->isFirstPageAfterLogin();
}

return parent::dispatch($request);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function getPriceList(Product $bundleProduct, $searchMin, $useRegularPric

if (!$useRegularPrice) {
$selectionsCollection->addAttributeToSelect('special_price');
$selectionsCollection->addAttributeToSelect('special_price_from');
$selectionsCollection->addAttributeToSelect('special_price_to');
$selectionsCollection->addAttributeToSelect('special_from_date');
$selectionsCollection->addAttributeToSelect('special_to_date');
$selectionsCollection->addAttributeToSelect('tax_class_id');
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

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->createMock(HttpRequest::class);
$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
Expand Up @@ -63,6 +63,10 @@
}
}
}

#po_number {
margin-bottom: 20px;
}
}

.payment-method-title {
Expand Down

0 comments on commit ff6e0b8

Please sign in to comment.