You are here

protected function WebformCivicrmTestBase::initFrontPage in Webform CiviCRM Integration 8.5

Visits the front page when initializing Mink.

According to the W3C WebDriver specification a cookie can only be set if the cookie domain is equal to the domain of the active document. When the browser starts up the active document is not our domain but 'about:blank' or similar. To be able to set our User-Agent and Xdebug cookies at the start of the test we now do a request to the front page so the active document matches the domain.

Overrides WebDriverTestBase::initFrontPage

See also

https://w3c.github.io/webdriver/webdriver-spec.html#add-cookie

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20975

File

tests/src/FunctionalJavascript/WebformCivicrmTestBase.php, line 103

Class

WebformCivicrmTestBase

Namespace

Drupal\Tests\webform_civicrm\FunctionalJavascript

Code

protected function initFrontPage() {
  parent::initFrontPage();

  // Fix hidden columns on build page.
  $this
    ->getSession()
    ->resizeWindow(1440, 900);
}