protected $defaultTheme = 'stark';
/**
* Tests sending non-JS and AJAX requests to open and manipulate modals.
*/
public function testDialog() { $this->
drupalLogin($this->
drupalCreateUser(['administer contact forms'
]));
// Ensure the elements render without notices or exceptions.
$this->
drupalGet('ajax-test/dialog'
);
// Set up variables for this test.
$dialog_renderable = AjaxTestController::
dialogContents();
$dialog_contents = \Drupal::
service('renderer'
)->
renderRoot($dialog_renderable);
// Check that requesting a modal dialog without JS goes to a page.
$this->
drupalGet('ajax-test/dialog-contents'
);
$this->
assertSession()->
responseContains($dialog_contents);
// Visit the page containing the many test dialog links.
$this->
drupalGet('ajax-test/dialog'
);
// Tests a basic modal dialog by verifying the contents of the dialog are as
// expected.