Skip to content

Commit a68f313

Browse files
committed
MQE-1112: Bump MFTF version in Magento
1 parent 4c436fc commit a68f313

File tree

6 files changed

+12
-24
lines changed

6 files changed

+12
-24
lines changed

dev/tests/functional/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/vendor
77
phpunit.xml
88
credentials.xml
9+
.htaccess

dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertHttpUsedOnFrontend.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AssertHttpUsedOnFrontend extends AbstractConstraint
2222
*
2323
* @var string
2424
*/
25-
private $unsecuredProtocol = \Magento\Framework\HTTP\PhpEnvironment\Request::SCHEME_HTTP;
25+
const SCHEME_HTTP = 'http';
2626

2727
/**
2828
* Browser interface.
@@ -53,11 +53,11 @@ public function processAssert(BrowserInterface $browser, Customer $customer)
5353

5454
// Log in to Customer Account on Storefront to assert that http is used indeed.
5555
$this->objectManager->create(LogInCustomerOnStorefront::class, ['customer' => $this->customer])->run();
56-
$this->assertUsedProtocol($this->unsecuredProtocol);
56+
$this->assertUsedProtocol(self::SCHEME_HTTP);
5757

5858
// Log out from Customer Account on Storefront to assert that JS is deployed validly as a part of statics.
5959
$this->objectManager->create(LogOutCustomerOnStorefront::class)->run();
60-
$this->assertUsedProtocol($this->unsecuredProtocol);
60+
$this->assertUsedProtocol(self::SCHEME_HTTP);
6161
}
6262

6363
/**

dev/tests/functional/tests/app/Magento/Backend/Test/Constraint/AssertHttpsUsedOnBackend.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,10 @@
1616
class AssertHttpsUsedOnBackend extends AbstractConstraint
1717
{
1818
/**
19-
* Secured protocol format.
20-
*
21-
* @var string
22-
*/
23-
private $securedProtocol = \Magento\Framework\HTTP\PhpEnvironment\Request::SCHEME_HTTPS;
24-
25-
/**
26-
* Unsecured protocol format.
27-
*
28-
* @var string
19+
* Protocols
2920
*/
30-
private $unsecuredProtocol = \Magento\Framework\HTTP\PhpEnvironment\Request::SCHEME_HTTP;
21+
const SCHEME_HTTP = 'http';
22+
const SCHEME_HTTPS = 'https';
3123

3224
/**
3325
* Browser interface.
@@ -50,7 +42,7 @@ public function processAssert(BrowserInterface $browser, Dashboard $adminDashboa
5042

5143
// Open specified Admin page using Navigation Menu to assert that JS is deployed validly as a part of statics.
5244
$adminDashboardPage->open()->getMenuBlock()->navigate($navMenuPath);
53-
$this->assertUsedProtocol($this->securedProtocol);
45+
$this->assertUsedProtocol(self::SCHEME_HTTPS);
5446
$this->assertDirectHttpUnavailable();
5547
}
5648

@@ -80,10 +72,10 @@ protected function assertUsedProtocol($expectedProtocol)
8072
*/
8173
protected function assertDirectHttpUnavailable()
8274
{
83-
$fakeUrl = str_replace($this->securedProtocol, $this->unsecuredProtocol, $this->browser->getUrl());
75+
$fakeUrl = str_replace(self::SCHEME_HTTPS, self::SCHEME_HTTP, $this->browser->getUrl());
8476
$this->browser->open($fakeUrl);
8577
\PHPUnit\Framework\Assert::assertStringStartsWith(
86-
$this->securedProtocol,
78+
self::SCHEME_HTTPS,
8779
$this->browser->getUrl(),
8880
'Merchant is not redirected to https if tries to access the Admin panel page directly via http.'
8981
);

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
namespace Magento\Customer\Test\TestCase;
88

9-
use Magento\Config\Test\Fixture\ConfigData;
10-
use Magento\Customer\Test\Constraint\AssertChangingWebsiteChangeCountries;
11-
use Magento\Framework\App\ObjectManager;
129
use Magento\Mtf\Fixture\FixtureFactory;
1310
use Magento\Mtf\Fixture\FixtureInterface;
1411
use Magento\Mtf\TestCase\Injectable;

dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/FormSections.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Magento\Ui\Test\Block\Adminhtml;
88

9-
use Magento\Framework\Exception\LocalizedException;
109
use Magento\Mtf\Fixture\InjectableFixture;
1110

1211
/**
@@ -53,13 +52,13 @@ protected function openContainer($sectionName)
5352
*
5453
* @param string $sectionName
5554
* @return $this
56-
* @throws LocalizedException if section is not visible
55+
* @throws \Exception if section is not visible
5756
*/
5857
public function openSection($sectionName)
5958
{
6059
$container = $this->getContainerElement($sectionName);
6160
if (!$container->isVisible()) {
62-
throw new LocalizedException(__('Container is not found "' . $sectionName . '""'));
61+
throw new \Exception('Container is not found "' . $sectionName . '""');
6362
}
6463
$section = $container->find($this->collapsedSection);
6564
if ($section->isVisible()) {

dev/tests/functional/utils/generate/repository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
*/
66
require_once dirname(__DIR__) . '/' . 'bootstrap.php';
77

8-
$magentoObjectManager->get(\Magento\Framework\App\State::class)->setAreaCode('frontend');
98
$objectManager->create(\Magento\Mtf\Util\Generate\Repository::class)->launch();

0 commit comments

Comments
 (0)