Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAdvancedReportingPage.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Client\BrowserInterface;
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 
14 class AssertAdvancedReportingPage extends AbstractConstraint
15 {
21  private $browser;
22 
30  public function processAssert(BrowserInterface $browser, $advancedReportingLink)
31  {
32  $this->browser = $browser;
33  $this->browser->selectWindow();
34  \PHPUnit\Framework\Assert::assertTrue(
35  $this->browser->waitUntil(
36  function () use ($advancedReportingLink) {
37  return ($this->browser->getUrl() === $advancedReportingLink) ? true : null;
38  }
39  ),
40  'Advanced Reporting Sign Up page was not opened by link.'
41  );
42  }
43 
49  public function toString()
50  {
51  return 'Advanced Reporting Sign Up page is opened by link';
52  }
53 }
processAssert(BrowserInterface $browser, $advancedReportingLink)
else function()