You are here

public function ConfigDeleteUITest::testFormValidation in Config Delete 8

Tests form validation.

File

tests/src/FunctionalJavascript/ConfigDeleteUITest.php, line 61

Class

ConfigDeleteUITest
Tests the user interface for deleting configuration.

Namespace

Drupal\Tests\config_delete\FunctionalJavascript

Code

public function testFormValidation() {
  $this
    ->drupalGet('admin/config/development/configuration/delete');
  $this
    ->getSession()
    ->getPage()
    ->selectFieldOption('config_type', 'rdf_mapping');
  $this
    ->assertSession()
    ->assertWaitOnAjaxRequest();
  $this
    ->getSession()
    ->getPage()
    ->selectFieldOption('config_name', '- Select -');
  $this
    ->assertSession()
    ->assertWaitOnAjaxRequest();
  $this
    ->getSession()
    ->getPage()
    ->pressButton('edit-submit');
  $this
    ->assertSession()
    ->pageTextContains($this
    ->t('Please select a valid configuration name.'));
}