You are here

public function QueueChangeFormTest::testChangeForm in Purge 8.3

Tests that the selection form looks as expected.

See also

\Drupal\purge_ui\Form\QueueDetailForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/QueueChangeFormTest.php, line 40

Class

QueueChangeFormTest
Tests \Drupal\purge_ui\Form\QueueChangeForm.

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testChangeForm() : void {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet($this
    ->getPath());

  // Assert some of the page presentation.
  $this
    ->assertSession()
    ->responseContains('Change queue engine');
  $this
    ->assertSession()
    ->responseContains('The queue engine is the underlying plugin which stores');
  $this
    ->assertSession()
    ->responseContains('when you change the queue, it will be emptied as well');
  $this
    ->assertSession()
    ->responseContains('Description');
  $this
    ->assertActionExists('edit-cancel', 'Cancel');
  $this
    ->assertActionExists('edit-submit', 'Change');

  // Assert that 'memory' is selected queue.
  $this
    ->assertSession()
    ->checkboxChecked('edit-plugin-id-memory');
}