You are here

public function QueuerDetailsFormTest::testDetailForm in Purge 8.3

Tests that the close button works and that content exists.

See also

\Drupal\purge_ui\Form\QueuerDetailForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/QueuerDetailsFormTest.php, line 63

Class

QueuerDetailsFormTest
Tests \Drupal\purge_ui\Form\PluginDetailsForm (for queuers).

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testDetailForm() : void {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet($this
    ->getPath());
  $this
    ->assertSession()
    ->responseContains('Queuer A');
  $this
    ->assertSession()
    ->responseContains('Test queuer A.');
  $this
    ->assertSession()
    ->responseContains('Close');
  $ajax = $this
    ->postAjaxForm([], 'Close');
  $this
    ->assertAjaxCommandCloseModalDialog($ajax);
  $this
    ->assertAjaxCommandsTotal($ajax, 1);
}