You are here

public function QueuerAddFormTest::testCancelSubmit in Purge 8.3

Tests that the cancel button closes the dialog.

See also

\Drupal\purge_ui\Form\QueuerAddForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/QueuerAddFormTest.php, line 97

Class

QueuerAddFormTest
Tests \Drupal\purge_ui\Form\QueuerAddForm.

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testCancelSubmit() : void {
  $this
    ->drupalLogin($this->adminUser);
  $ajax = $this
    ->postAjaxForm([], 'Cancel');
  $this
    ->assertAjaxCommandCloseModalDialog($ajax);
  $this
    ->assertAjaxCommandsTotal($ajax, 1);
}