diff --git a/core/modules/node/src/Tests/PagePreviewAnonymousTest.php b/core/modules/node/src/Tests/PagePreviewAnonymousTest.php
new file mode 100644
index 0000000000..1372eee078
--- /dev/null
+++ b/core/modules/node/src/Tests/PagePreviewAnonymousTest.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Drupal\node\Tests;
+
+use Drupal\Core\Session\AccountInterface;
+use Drupal\user\Entity\Role;
+
+/**
+ * Tests the node entity preview functionality.
+ *
+ * @group node
+ */
+class PagePreviewAnonymousTest extends NodeTestBase {
+
+  /**
+   * Enable the comment, node and taxonomy modules to test on the preview.
+   *
+   * @var array
+   */
+  public static $modules = ['node', 'text'];
+
+  /**
+   * The name of the created field.
+   *
+   * @var string
+   */
+  protected $fieldName;
+
+  protected function setUp() {
+     parent::setUp();
+    // Grant editing permissions to anonymous user:
+    $anonymous_role = Role::load(AccountInterface::ANONYMOUS_ROLE);
+    $anonymous_role->grantPermission('create page content');
+    $anonymous_role->grantPermission('edit own page content');
+    $anonymous_role->save();
+  }
+
+  /**
+   * Checks the node preview functionality for anonymous users.
+   */
+  public function testAnonymousPagePreview() {
+
+    $title_key = 'title[0][value]';
+    $body_key = 'body[0][value]';
+
+    // Fill in node creation form and preview node.
+    $edit = [];
+    $edit[$title_key] = '<em>' . $this->randomMachineName(8) . '</em>';
+    $edit[$body_key] = $this->randomMachineName(16);
+    $this->drupalPostForm('node/add/page', $edit, t('Preview'));
+
+    // Check that the preview is displaying the title, body and term.
+    $this->assertTitle(t('@title | Drupal', ['@title' => $edit[$title_key]]), 'Basic page title is preview.');
+    $this->assertEscaped($edit[$title_key], 'Title displayed and escaped.');
+    $this->assertText($edit[$body_key], 'Body displayed.');
+    $this->assertLink(t('Back to content editing'));
+  }
+}
