You are here

public function CloudFlareAdminSettingsInvalidFormTest::testConfigFormDisplay in CloudFlare 8

Tests that form has critical fields as expected.

File

tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php, line 49

Class

CloudFlareAdminSettingsInvalidFormTest
Tests \Drupal\purge_ui\Form\CloudFlareAdminSettingsForm.

Namespace

Drupal\Tests\cloudflare\Functional

Code

public function testConfigFormDisplay() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet($this->route);
  $this
    ->assertSession()
    ->pageTextContains('This will help suppress log warnings regarding requests bypassing CloudFlare', 'Helper Text');
  $this
    ->assertSession()
    ->fieldExists('apikey');
  $this
    ->assertSession()
    ->fieldExists('email');
  $this
    ->assertSession()
    ->fieldExists('client_ip_restore_enabled');
  $this
    ->assertSession()
    ->fieldExists('bypass_host');
}