diff --git a/core/modules/content_moderation/src/Tests/ModerationFormTest.php b/core/modules/content_moderation/src/Tests/ModerationFormTest.php index 8d0ea1f..49e1331 100644 --- a/core/modules/content_moderation/src/Tests/ModerationFormTest.php +++ b/core/modules/content_moderation/src/Tests/ModerationFormTest.php @@ -43,11 +43,11 @@ public function testModerationForm() { $this->assertTrue($this->adminUser->hasPermission('edit any moderated_content content')); - // The published view should have a moderation form, because it is not the + // The canonical view should have a moderation form, because it is not the // live revision. $this->drupalGet($canonical_path); $this->assertResponse(200); - $this->assertText('Status', 'The node view page has a moderation form.'); + $this->assertField('edit-new-state', 'The node view page has a moderation form.'); // The latest version page should not show, because there is no forward // revision. @@ -59,11 +59,11 @@ public function testModerationForm() { 'body[0][value]' => 'Second version of the content.', ], t('Save and Create New Draft')); - // The published view should have a moderation form, because it is not the + // The canonical view should have a moderation form, because it is not the // live revision. $this->drupalGet($canonical_path); $this->assertResponse(200); - $this->assertText('Status', 'The node view page has a moderation form.'); + $this->assertField('edit-new-state', 'The node view page has a moderation form.'); // The latest version page should not show, because there is still no // forward revision. @@ -76,10 +76,10 @@ public function testModerationForm() { ], t('Save and Publish')); // The published view should not have a moderation form, because it is the - // default revision. + // live revision. $this->drupalGet($canonical_path); $this->assertResponse(200); - $this->assertNoText('Status', 'The node view page has no moderation form.'); + $this->assertNoField('edit-new-state', 'The node view page has no moderation form.'); // The latest version page should not show, because there is still no // forward revision. @@ -92,16 +92,16 @@ public function testModerationForm() { ], t('Save and Create New Draft')); // The published view should not have a moderation form, because it is the - // default revision. + // live revision. $this->drupalGet($canonical_path); $this->assertResponse(200); - $this->assertNoText('Status', 'The node view page has no moderation form.'); + $this->assertNoField('edit-new-state', 'The node view page has no moderation form.'); // The latest version page should show the moderation form and have "Draft" // status, because the forward revision is in "Draft". $this->drupalGet($latest_version_path); $this->assertResponse(200); - $this->assertText('Status', 'Form text found on the latest-version page.'); + $this->assertField('edit-new-state', 'The latest-version page has a moderation form.'); $this->assertText('Draft', 'Correct status found on the latest-version page.'); // Submit the moderation form to change status to published.