You are here

public function QueueDetailsFormTest::testDetailForm in Purge 8.3

Tests that the close button works and that content exists.

See also

\Drupal\purge_ui\Form\QueueDetailForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/QueueDetailsFormTest.php, line 53

Class

QueueDetailsFormTest
Tests \Drupal\purge_ui\Form\PluginDetailsForm (for queue backends).

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testDetailForm() : void {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet($this
    ->getPath());
  $this
    ->assertSession()
    ->responseContains('Memory');
  $this
    ->assertSession()
    ->responseContains('A non-persistent, per-request memory queue (not useful on production systems).');
  $this
    ->assertSession()
    ->responseContains('Close');
  $ajax = $this
    ->postAjaxForm([], 'Close');
  $this
    ->assertAjaxCommandCloseModalDialog($ajax);
  $this
    ->assertAjaxCommandsTotal($ajax, 1);
}