diff --git a/core/modules/entity_reference/src/Tests/EntityReferenceAdminTest.php b/core/modules/entity_reference/src/Tests/EntityReferenceAdminTest.php
index 454c8ed..6c72d49 100644
--- a/core/modules/entity_reference/src/Tests/EntityReferenceAdminTest.php
+++ b/core/modules/entity_reference/src/Tests/EntityReferenceAdminTest.php
@@ -25,11 +25,11 @@ class EntityReferenceAdminTest extends WebTestBase {
    *
    * Enable path module to ensure that the selection handler does not fail for
    * entities with a path field.
+   * Enable views_ui module to see the no_view_help text.
    *
    * @var array
    */
-  public static $modules = array('node', 'field_ui', 'entity_reference', 'path', 'taxonomy', 'block', 'views');
-
+  public static $modules = array('node', 'field_ui', 'entity_reference', 'path', 'taxonomy', 'block', 'views', 'views_ui', 'entity_test');
 
   /**
    * The name of the content type created for testing purposes.
@@ -46,7 +46,7 @@ protected function setUp() {
     $this->drupalPlaceBlock('system_breadcrumb_block');
 
     // Create test user.
-    $admin_user = $this->drupalCreateUser(array('access content', 'administer node fields', 'administer node display'));
+    $admin_user = $this->drupalCreateUser(array('access content', 'administer node fields', 'administer node display', 'administer views'));
     $this->drupalLogin($admin_user);
 
     // Create a content type, with underscores.
@@ -149,15 +149,53 @@ public function testFieldAdminHandler() {
     $this->drupalGet($bundle_path . '/fields/' . $field_name);
     $this->assertFieldByName('settings[handler_settings][filter][type]', '_none');
 
+    // Switch the target type to 'node'.
+    $field_name = 'node.' . $this->type . '.field_test';
+    $edit = array(
+      'settings[target_type]' => 'node',
+    );
+    $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings'));
+
     // Try to select the views handler.
     $edit = array(
       'settings[handler]' => 'views',
     );
     $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]');
+    $this->assertRaw(t('No eligible views were found. <a href="@create">Create a view</a> with an <em>Entity Reference</em> display, or add such a display to an <a href="@existing">existing view</a>.', array(
+      '@create' => \Drupal::url('views_ui.add'),
+      '@existing' => \Drupal::url('entity.view.collection'),
+    )));
+    $this->drupalPostForm(NULL, $edit, t('Save settings'));
+    // If no eligible view is available we should see a message.
+    $this->assertText('The views entity selection mode requires a view.');
+
+    // Enable the entity_reference_test module which creates an eligible view.
+    $this->container->get('module_installer')->install(array('entity_reference_test'));
+    $this->resetAll();
+    $this->drupalGet($bundle_path . '/fields/' . $field_name);
+    $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]');
+    $edit = array(
+      'settings[handler_settings][view][view_and_display]' => 'test_entity_reference:entity_reference_1',
+    );
     $this->drupalPostForm(NULL, $edit, t('Save settings'));
     $this->assertResponse(200);
-  }
 
+    // Switch the target type to 'entity_test'.
+    $edit = array(
+      'settings[target_type]' => 'entity_test',
+    );
+    $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings'));
+    $this->drupalGet($bundle_path . '/fields/' . $field_name);
+    $edit = array(
+      'settings[handler]' => 'views',
+    );
+    $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]');
+    $edit = array(
+      'settings[handler_settings][view][view_and_display]' => 'test_entity_reference_entity_test:entity_reference_1',
+    );
+    $this->drupalPostForm(NULL, $edit, t('Save settings'));
+    $this->assertResponse(200);
+  }
 
   /**
    * Tests the formatters for the Entity References
diff --git a/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference_entity_test.yml b/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference_entity_test.yml
new file mode 100644
index 0000000..7902c23
--- /dev/null
+++ b/core/modules/entity_reference/tests/modules/entity_reference_test/config/install/views.view.test_entity_reference_entity_test.yml
@@ -0,0 +1,121 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - entity_reference
+    - entity_reference_test
+    - entity_test
+id: test_entity_reference_entity_test
+label: 'Entity reference'
+module: views
+description: ''
+tag: ''
+base_table: entity_test
+base_field: id
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: 0
+    display_options:
+      access:
+        type: none
+      cache:
+        type: none
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: full
+      style:
+        type: default
+      row:
+        type: fields
+      fields:
+        name:
+          table: entity_test
+          field: name
+          id: name
+          entity_type: null
+          entity_field: name
+          plugin_id: field
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: ''
+          exclude: false
+          alter:
+            alter_text: false
+            text: ''
+            make_link: false
+            path: ''
+            absolute: false
+            external: false
+            replace_spaces: false
+            path_case: none
+            trim_whitespace: false
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: false
+            max_length: 0
+            word_boundary: true
+            ellipsis: true
+            more_link: false
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: false
+            trim: false
+            preserve_tags: ''
+            html: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_empty: false
+          empty_zero: false
+          hide_alter_empty: true
+          click_sort_column: value
+          type: string
+          settings: {  }
+          group_column: value
+          group_columns: {  }
+          group_rows: true
+          delta_limit: 0
+          delta_offset: 0
+          delta_reversed: false
+          delta_first_last: false
+          multi_type: separator
+          separator: ', '
+          field_api_classes: false
+      filters: {  }
+      sorts: {  }
+      header: {  }
+      footer: {  }
+      empty: {  }
+      relationships: {  }
+      arguments: {  }
+      display_extenders: {  }
+  entity_reference_1:
+    display_plugin: entity_reference
+    id: entity_reference_1
+    display_title: EntityReference
+    position: null
+    display_options:
+      display_extenders: {  }
+      style:
+        type: entity_reference
+        options:
+          search_fields:
+            name: name
diff --git a/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml b/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml
index e465519..883c70e 100644
--- a/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml
+++ b/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml
@@ -9,3 +9,4 @@ dependencies:
   - node
   - user
   - views
+  - entity_test
