diff --git a/src/Tests/SwiftMailerSettingsTest.php b/src/Tests/SwiftMailerSettingsTest.php
deleted file mode 100644
index d94c241..0000000
--- a/src/Tests/SwiftMailerSettingsTest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-
-namespace Drupal\swiftmailer\Tests;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests the Transport and Message Settings UI.
- *
- * @group swiftmailer
- */
-class SwiftMailerSettingsTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = [
-    'swiftmailer',
-    'mailsystem',
-    'block',
-  ];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->drupalPlaceBlock('local_tasks_block');
-    $this->drupalPlaceBlock('local_actions_block');
-  }
-
-  /**
-   * Tests the Transport Settings.
-   */
-  public function testTransportSettings() {
-    // Unauthorized user should not have access.
-    $this->drupalGet('admin/config/swiftmailer/transport');
-    $this->assertResponse(403);
-
-    // Login..
-    $user = $this->createUser(['administer swiftmailer']);
-    $this->drupalLogin($user);
-    $this->drupalGet(t('admin/config/swiftmailer/transport'));
-    $this->assertText(t('Transport types'));
-
-    // Select Smtp tranport option.
-    $this->drupalPostAjaxForm(NULL, ['transport[type]' => 'smtp'], ['transport[type]' => 'smtp']);
-    $this->drupalPostForm(NULL, [
-      'transport[type]' => 'smtp',
-      'transport[configuration][smtp][credential_provider]' => 'swiftmailer',
-      'transport[configuration][smtp][credentials][swiftmailer][username]' => 'example',
-      'transport[configuration][smtp][credentials][swiftmailer][password]' => 'pass',
-    ], t('Save configuration'));
-    $this->assertText('using the SMTP transport type.');
-
-    // Loading configuration to check if is set up correctly.
-    $config = $this->config('swiftmailer.transport');
-    $transport = $config->get('transport');
-    $provider = $config->get('smtp_credential_provider');
-    $user = $config->get('smtp_credentials.swiftmailer.username');
-    $password = $config->get('smtp_credentials.swiftmailer.password');
-    $this->assertEqual($transport, 'smtp');
-    $this->assertEqual($provider, 'swiftmailer');
-    $this->assertEqual($user, 'example');
-    $this->assertEqual($password, 'pass');
-
-    // Select Sppol tranport option.
-    $this->drupalPostAjaxForm(NULL, ['transport[type]' => 'spool'], ['transport[type]' => 'spool']);
-    $this->drupalPostForm(NULL, [
-      'transport[type]' => 'spool',
-      'transport[configuration][spool][directory]' => 'aaaaa',
-    ], t('Save configuration'));
-    $this->assertText('using the Spool transport type.');
-
-    // Loading configuration to check if is set up correctly.
-    $config = $this->config('swiftmailer.transport');
-    $transport = $config->get('transport');
-    $directory = $config->get('spool_directory');
-    $this->assertEqual($transport, 'spool');
-    $this->assertEqual($directory, 'aaaaa');
-
-    // Select Sendmail tranport option.
-    $this->drupalPostAjaxForm(NULL, ['transport[type]' => 'sendmail'], ['transport[type]' => 'sendmail']);
-    $this->drupalPostForm(NULL, [
-      'transport[type]' => 'sendmail',
-      'transport[configuration][sendmail][path]' => 'bbbbb',
-    ], t('Save configuration'));
-    $this->assertText('using the Sendmail transport type.');
-
-    // Loading configuration to check if is set up correctly.
-    $config = $this->config('swiftmailer.transport');
-    $transport = $config->get('transport');
-    $path = $config->get('sendmail_path');
-    $this->assertEqual($transport, 'sendmail');
-    $this->assertEqual($path, 'bbbbb');
-  }
-
-  /**
-   * Tests the Message Settings.
-   */
-  public function testMessageSettings() {
-    $this->drupalGet('admin/config/swiftmailer/transport');
-    $this->assertResponse(403);
-
-    // Login..
-    $user = $this->createUser(['administer swiftmailer']);
-    $this->drupalLogin($user);
-    $this->drupalGet(t('admin/config/swiftmailer/transport'));
-    $this->assertText(t('Transport types'));
-
-    $this->clickLink('Messages');
-    $this->assertText(t('Message format'));
-
-    $this->drupalPostForm(NULL, [
-      'format[type]' => 'text/html',
-      'convert[mode]' => 'TRUE',
-      'character_set[type]' => 'EUC-CN',
-    ], t('Save configuration'));
-    $this->assertText('The configuration options have been saved.');
-
-    $config = $this->config('swiftmailer.message');
-    $format = $config->get('format');
-    $mode = $config->get('convert_mode');
-    $character = $config->get('character_set');
-    $this->assertEqual($format, 'text/html');
-    $this->assertEqual($mode, 'TRUE');
-    $this->assertEqual($character, 'EUC-CN');
-  }
-
-}
diff --git a/tests/src/FunctionalJavascript/SwiftMailerSettingsTest.php b/tests/src/FunctionalJavascript/SwiftMailerSettingsTest.php
new file mode 100644
index 0000000..f42c125
--- /dev/null
+++ b/tests/src/FunctionalJavascript/SwiftMailerSettingsTest.php
@@ -0,0 +1,145 @@
+<?php
+
+namespace Drupal\Tests\swiftmailer\FunctionalJavascript;
+
+use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
+
+/**
+ * Tests the Transport and Message Settings UI.
+ *
+ * @group swiftmailer
+ */
+class SwiftMailerSettingsTest extends WebDriverTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'swiftmailer',
+    'mailsystem',
+    'block',
+  ];
+
+  /**
+   * The user object.
+   *
+   * @var \Drupal\user\UserInterface.
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->drupalPlaceBlock('local_tasks_block');
+    $this->drupalPlaceBlock('local_actions_block');
+
+    $this->adminUser = $this->createUser(['administer swiftmailer']);
+  }
+
+  /**
+   * Tests the Transport Settings.
+   */
+  public function testTransportSettings() {
+    // Unauthorized user should not have access.
+    $this->drupalGet('admin/config/swiftmailer/transport');
+    $this->assertSession()->pageTextContains('You are not authorized to access this page.');
+
+    // Login..
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('admin/config/swiftmailer/transport');
+    $this->assertSession()->pageTextContains('Transport types');
+
+    $session = $this->getSession();
+    $page = $session->getPage();
+
+    // Select Smtp tranport option.
+    $page->fillField('transport[type]', 'smtp');
+    $this->assertSession()->waitForElementVisible('css', '.js-form-item-transport-configuration-smtp');
+    $page->fillField('transport[configuration][smtp][credential_provider]', 'swiftmailer');
+    $page->fillField('transport[configuration][smtp][credentials][swiftmailer][username]', 'example');
+    $page->fillField('transport[configuration][smtp][credentials][swiftmailer][password]', 'pass');
+    $this->submitForm([], 'Save configuration');
+
+    $this->assertSession()->pageTextContains('using the SMTP transport type.');
+
+    // Loading configuration to check if is set up correctly.
+    $config = $this->config('swiftmailer.transport');
+    $transport = $config->get('transport');
+    $provider = $config->get('smtp_credential_provider');
+    $user = $config->get('smtp_credentials.swiftmailer.username');
+    $password = $config->get('smtp_credentials.swiftmailer.password');
+    $this->assertEqual($transport, 'smtp');
+    $this->assertEqual($provider, 'swiftmailer');
+    $this->assertEqual($user, 'example');
+    $this->assertEqual($password, 'pass');
+
+    // Select Spool tranport option.
+    $page->fillField('transport[type]', 'spool');
+    $this->assertSession()->waitForElementVisible('css', '.js-form-item-transport-configuration-spool');
+    $page->fillField('transport[configuration][spool][directory]', 'aaaaa');
+    $this->submitForm([], 'Save configuration');
+    $this->assertSession()->pageTextContains('using the Spool transport type.');
+
+    // Loading configuration to check if is set up correctly.
+    $config = $this->config('swiftmailer.transport');
+    $transport = $config->get('transport');
+    $directory = $config->get('spool_directory');
+    $this->assertEqual($transport, 'spool');
+    $this->assertEqual($directory, 'aaaaa');
+
+    // Select Sendmail tranport option.
+    $page->fillField('transport[type]', 'sendmail');
+    $this->assertSession()->waitForElementVisible('css', '.js-form-item-transport-configuration-sendmail');
+    $page->fillField('transport[configuration][sendmail][path]', 'bbbbb');
+    $this->submitForm([], 'Save configuration');
+    $this->assertSession()->pageTextContains('using the Sendmail transport type.');
+
+    // Loading configuration to check if is set up correctly.
+    $config = $this->config('swiftmailer.transport');
+    $transport = $config->get('transport');
+    $path = $config->get('sendmail_path');
+    $this->assertEqual($transport, 'sendmail');
+    $this->assertEqual($path, 'bbbbb');
+  }
+
+  /**
+   * Tests the Message Settings.
+   */
+  public function testMessageSettings() {
+    $this->drupalGet('admin/config/swiftmailer/transport');
+    $this->assertSession()->pageTextContains('You are not authorized to access this page.');
+
+    // Login..
+    $this->drupalLogin($this->adminUser);
+    $this->drupalGet('admin/config/swiftmailer/transport');
+    $this->assertSession()->pageTextContains('Transport types');
+
+    $this->clickLink('Messages');
+    $this->assertSession()->pageTextContains('Message format');
+
+    $this->drupalPostForm(NULL, [
+      'format[type]' => 'text/html',
+      'convert[mode]' => TRUE,
+      'character_set[type]' => 'EUC-CN',
+    ], 'Save configuration');
+    $this->assertSession()->pageTextContains('The configuration options have been saved.');
+
+    $config = $this->config('swiftmailer.message');
+    $format = $config->get('format');
+    $mode = $config->get('convert_mode');
+    $character = $config->get('character_set');
+    $this->assertEqual($format, 'text/html');
+    $this->assertEqual($mode, TRUE);
+    $this->assertEqual($character, 'EUC-CN');
+  }
+
+}
diff --git a/tests/themes/swiftmailer_test_theme/swiftmailer_test_theme.info.yml b/tests/themes/swiftmailer_test_theme/swiftmailer_test_theme.info.yml
index 48574c5..e106767 100644
--- a/tests/themes/swiftmailer_test_theme/swiftmailer_test_theme.info.yml
+++ b/tests/themes/swiftmailer_test_theme/swiftmailer_test_theme.info.yml
@@ -3,3 +3,4 @@ type: theme
 description: 'Support theme for testing SwiftMailer'
 version: VERSION
 core: 8.x
+base theme: false
