diff --git a/core/modules/file/src/Tests/FileFieldDisplayTest.php b/core/modules/file/src/Tests/FileFieldDisplayTest.php
index 1b7e534211..2a27e24812 100644
--- a/core/modules/file/src/Tests/FileFieldDisplayTest.php
+++ b/core/modules/file/src/Tests/FileFieldDisplayTest.php
@@ -105,6 +105,11 @@ public function testNodeDisplay() {
     $this->clickLink(t('Back to content editing'));
     $this->assertRaw($field_name . '[0][display]', 'First file appears as expected.');
     $this->assertRaw($field_name . '[1][display]', 'Second file appears as expected.');
+
+    // Regression test. Verify the file fields don't contain duplicate HTML IDs.
+    // @todo The ajax wrapper has a duplicate ID and is skipped in this test.
+    // @see https://www.drupal.org/node/2346893
+    $this->assertNoDuplicateIds('', 'Other', ["edit-$field_name-ajax-wrapper"]);
   }
 
   /**
