You are here

public function ExtlinkAdminTest::testExtlinkDisabledOnAdminRoutes in External Links 8

Checks to see if external link is disabled on admin routes.

File

tests/src/FunctionalJavascript/ExtlinkAdminTest.php, line 32

Class

ExtlinkAdminTest
Testing of the External Links administration interface and functionality.

Namespace

Drupal\Tests\extlink\FunctionalJavascript

Code

public function testExtlinkDisabledOnAdminRoutes() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet(self::EXTLINK_ADMIN_PATH);
  $this
    ->assertSession()
    ->checkboxNotChecked('extlink_exclude_admin_routes');
  $this
    ->assertRaw('/extlink/extlink.js');

  // Disable Extlink on admin routes.
  $this
    ->drupalGet(self::EXTLINK_ADMIN_PATH);
  $this
    ->submitForm([
    'extlink_exclude_admin_routes' => TRUE,
  ], 'Save configuration');
  $this
    ->assertNoRaw('/extlink/extlink.js');
}