src/Tests/ExtlinkTest.php | 7 +++++-- src/Tests/ExtlinkTestBase.php | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Tests/ExtlinkTest.php b/src/Tests/ExtlinkTest.php index d69f30b..f22eabf 100644 --- a/src/Tests/ExtlinkTest.php +++ b/src/Tests/ExtlinkTest.php @@ -13,8 +13,11 @@ class ExtlinkTest extends ExtlinkTestBase { * Checks to see if we can get the front page. */ public function testExtlinkOnFrontPage() { - // Get main page. - $this->drupalGet(''); + // Get front page. + $this->drupalGet(''); + + // Test that the front page has the span. + $this->assertElementVisible('span .ext', 'There should be an External Link on the form.'); } } diff --git a/src/Tests/ExtlinkTestBase.php b/src/Tests/ExtlinkTestBase.php index 9524e1a..9db9654 100644 --- a/src/Tests/ExtlinkTestBase.php +++ b/src/Tests/ExtlinkTestBase.php @@ -2,16 +2,16 @@ namespace Drupal\extlink\Tests; -use Drupal\simpletest\WebTestBase; +use Drupal\FunctionalJavascriptTests\JavascriptTestBase; /** * Base class for External Link tests. * * Provides common setup stuff and various helper functions. */ -abstract class ExtlinkTestBase extends WebTestBase { +abstract class ExtlinkTestBase extends JavascriptTestBase { - public static $modules = array('extlink'); + public static $modules = ['extlink']; /** * User with various administrative permissions.