9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\Mtf\Client\BrowserInterface;
11 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
44 $adminDashboardPage->open()->getMenuBlock()->navigate($navMenuPath);
57 if (substr($expectedProtocol, -3) !==
"://") {
58 $expectedProtocol .=
'://';
61 \PHPUnit\Framework\Assert::assertStringStartsWith(
63 $this->browser->getUrl(),
64 "$expectedProtocol is not used." 75 $fakeUrl = str_replace(self::SCHEME_HTTPS, self::SCHEME_HTTP, $this->browser->getUrl());
76 $this->browser->open($fakeUrl);
77 \PHPUnit\Framework\Assert::assertStringStartsWith(
79 $this->browser->getUrl(),
80 'Merchant is not redirected to https if tries to access the Admin panel page directly via http.' 91 return 'Secured URLs are used for Admin panel pages.';
processAssert(BrowserInterface $browser, Dashboard $adminDashboardPage, $navMenuPath)
assertUsedProtocol($expectedProtocol)
assertDirectHttpUnavailable()