You are here

public function QueueBrowserFormTest::testClose in Purge 8.3

Tests that the close button closes the dialog.

See also

\Drupal\purge_ui\Form\QueueBrowserForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/QueueBrowserFormTest.php, line 73

Class

QueueBrowserFormTest
Tests \Drupal\purge_ui\Form\QueueBrowserForm.

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testClose() : void {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet($this
    ->getPath());
  $this
    ->assertSession()
    ->pageTextContains("Close");
  $ajax = $this
    ->postAjaxForm([], 'Close');
  $this
    ->assertAjaxCommandCloseModalDialog($ajax);
  $this
    ->assertAjaxCommandsTotal($ajax, 1);
}