diff --git a/lib/Drupal/views/Tests/UiSettingsTest.php b/lib/Drupal/views/Tests/UiSettingsTest.php
new file mode 100644
index 0000000..41d25db
--- /dev/null
+++ b/lib/Drupal/views/Tests/UiSettingsTest.php
@@ -0,0 +1,144 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\views\Tests\UiSettingsTest.
+ */
+
+namespace Drupal\views\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests the various settings in the views ui.
+ */
+class UiSettingsTest extends WebTestBase {
+
+  /**
+   * Stores an admin user used by the different tests.
+   *
+   * @var Drupal\user\User
+   */
+  protected $adminUser;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Views UI settings',
+      'description' => 'Tests all ui related settings under admin/structure/views/settings.',
+      'group' => 'Views UI',
+    );
+  }
+
+  protected function setUp() {
+    parent::setUp('views', 'views_ui');
+    $this->adminUser = $this->drupalCreateUser(array('administer views'));
+  }
+
+
+  /**
+   * Tests the settings for the views listing page.
+   */
+  function testViewsListing() {
+    $this->drupalLogin($this->adminUser);
+
+    // Configure to hide listing filters.
+    $edit = array(
+      'views_ui_show_listing_filters' => FALSE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+    $this->drupalGet('admin/structure/views');
+
+    $this->assertFieldByXPath("//div[contains(@class, 'ctools-export-ui-row')][contains(@class, 'element-invisible')]");
+
+    // Configure to show listing filters.
+    $edit = array(
+      'views_ui_show_listing_filters' => TRUE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+    $this->drupalGet('admin/structure/views');
+
+    $this->assertNoFieldByXPath("//div[contains(@class, 'ctools-export-ui-row')][contains(@class, 'element-invisible')]");
+  }
+
+  /**
+   * Tests the advanced help message setting.
+   */
+  function testAdvancedHelpMessage() {
+    $this->drupalLogin($this->adminUser);
+
+    // Configure to hide the advanced help message.
+    $edit = array(
+      'views_ui_show_advanced_help_warning' => FALSE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+    $this->drupalGet('admin/structure/views');
+
+    $this->assertNoText(t('If you install the advanced help module'));
+
+    // Configure to show the advanced help message.
+    $edit = array(
+      'views_ui_show_advanced_help_warning' => TRUE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+    $this->drupalGet('admin/structure/views');
+
+    $this->assertText(t('If you install the advanced help module'));
+  }
+
+  /**
+   * Tests the settings for the edit ui.
+   */
+  function testEditUi() {
+    $this->drupalLogin($this->adminUser);
+
+    // Configure to always show the master display.
+    $edit = array(
+      'views_ui_show_master_display' => TRUE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+
+    $view = array();
+    $view['human_name'] = $this->randomName(16);
+    $view['name'] = strtolower($this->randomName(16));
+    $view['description'] = $this->randomName(16);
+    $view['page[create]'] = TRUE;
+    $view['page[title]'] = $this->randomName(16);
+    $view['page[path]'] = $this->randomName(16);
+    $this->drupalPost('admin/structure/views/add', $view, t('Continue & edit'));
+
+    $this->assertLink(t('Master'));
+
+    // Configure to not always show the master display.
+    // If you have a view without a page or block the master display should be
+    // still shown.
+    $view['page[create]'] = FALSE;
+    $this->drupalPost('admin/structure/views/add', $view, t('Continue & edit'));
+
+    $this->assertLink(t('Master'));
+
+    // Create a view with an additional display, so master should be hidden.
+    $view['page[create]'] = TRUE;
+    $this->drupalPost('admin/structure/views/add', $view, t('Continue & edit'));
+
+    $this->assertNoLink(t('Master'));
+
+    // Configure to always show the advanced settings.
+    $edit = array(
+      'views_ui_show_advanced_column' => TRUE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+
+    $this->drupalPost('admin/structure/views/add', $view, t('Continue & edit'));
+    $this->assertNoFieldByXPath("//span[contains(@class, 'ctools-toggle-collapsed')]");
+
+    // Configure to not always show the advanced settings.
+    $edit = array(
+      'views_ui_show_advanced_column' => TRUE,
+    );
+    $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration'));
+
+    $this->drupalPost('admin/structure/views/add', $view, t('Continue & edit'));
+    $this->assertFieldByXPath("//span[contains(@class, 'ctools-toggle-collapsed')]");
+  }
+
+}
