You are here

public function ProcessorDetailsFormTest::testDetailForm in Purge 8.3

Tests that the close button works and that content exists.

See also

\Drupal\purge_ui\Form\ProcessorDetailForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

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

Class

ProcessorDetailsFormTest
Tests \Drupal\purge_ui\Form\PluginDetailsForm (for processors).

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

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