public function assertInsert(string
$render_type, string
$expected, string
$script = ''
): void
{ // Check insert to block element.
$this->
drupalGet('ajax-test/insert-block-wrapper'
);
$this->
getSession()->
executeScript($script);
$this->
clickLink("Link html
$render_type"
);
$this->
assertWaitPageContains('<div class="ajax-target-wrapper"><div id="ajax-target">' .
$expected . '</div></div>'
);
$this->
drupalGet('ajax-test/insert-block-wrapper'
);
$this->
getSession()->
executeScript($script);
$this->
clickLink("Link replaceWith
$render_type"
);
$this->
assertWaitPageContains('<div class="ajax-target-wrapper">' .
$expected . '</div>'
);
// Check insert to inline element.
$this->
drupalGet('ajax-test/insert-inline-wrapper'
);
$this->
getSession()->
executeScript($script);
$this->
clickLink("Link html
$render_type"
);
$this->
assertWaitPageContains('<div class="ajax-target-wrapper"><span id="ajax-target-inline">' .
$expected . '</span></div>'
);