diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index 52772afe22..4b519f63eb 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -493,7 +493,8 @@ public function testWorkflowInUse() { $this->drupalPostForm('node/add/moderated_content', [ 'title[0][value]' => 'Some moderated content', 'body[0][value]' => 'First version of the content.', - ], 'Save and Create New Draft'); + 'moderation_state[0][state]' => 'draft', + ], 'Save'); // The archived state is not used yet, so can still be deleted. $this->drupalGet($paths['archived_state']); @@ -504,8 +505,12 @@ public function testWorkflowInUse() { $this->assertSession()->buttonNotExists('Delete'); $node = $this->drupalGetNodeByTitle('Some moderated content'); - $this->drupalPostForm('node/' . $node->id() . '/edit', [], 'Save and Publish'); - $this->drupalPostForm('node/' . $node->id() . '/edit', [], 'Save and Archive'); + $this->drupalPostForm('node/' . $node->id() . '/edit', [ + 'moderation_state[0][state]' => 'published', + ], 'Save'); + $this->drupalPostForm('node/' . $node->id() . '/edit', [ + 'moderation_state[0][state]' => 'archived', + ], 'Save'); // Now the archived state is being used so it can not be deleted either. foreach ($paths as $path) {