only in patch2: unchanged: --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -80,6 +80,17 @@ public function testModerationForm() { $this->assertResponse(200); $this->assertField('edit-new-state', 'The node view page has a moderation form.'); + // Preview the draft. + $this->drupalPostForm($edit_path, [ + 'body[0][value]' => 'Second version of the content.', + 'moderation_state[0][state]' => 'draft', + ], t('Preview')); + + // The preview view should not have a moderation form. + $this->drupalGet($canonical_path); + $this->assertResponse(200); + $this->assertNoField('edit-new-state', 'The node preview page has no moderation form.'); + // The latest version page should not show, because there is still no // pending revision. $this->drupalGet($latest_version_path);