Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / content_moderation / tests / src / Functional / ContentModerationWorkflowTypeTest.php
index 195718a6fe286ebc7298343085622eb2069cd2bd..cbe5807a5fbed274d7892e26630f5fdfecb86cff 100644 (file)
@@ -19,6 +19,7 @@ class ContentModerationWorkflowTypeTest extends BrowserTestBase {
   public static $modules = [
     'content_moderation',
     'node',
+    'entity_test',
   ];
 
   /**
@@ -92,10 +93,15 @@ class ContentModerationWorkflowTypeTest extends BrowserTestBase {
     $session->fieldDisabled('type_settings[default_revision]');
 
     $this->drupalGet('admin/config/workflow/workflows/manage/test/type/node');
-    $session->pageTextContains('Select the content type entities for the Test workflow');
+    $session->pageTextContains('Select the content types for the Test workflow');
     foreach ($types as $type) {
       $session->pageTextContains($type->label());
+      $session->elementContains('css', sprintf('.form-item-bundles-%s label', $type->id()), sprintf('Update %s', $type->label()));
     }
+
+    // Ensure warning message are displayed for unsupported features.
+    $this->drupalGet('admin/config/workflow/workflows/manage/test/type/entity_test_rev');
+    $this->assertSession()->pageTextContains('Test entity - revisions entities do not support publishing statuses. For example, even after transitioning from a published workflow state to an unpublished workflow state they will still be visible to site visitors.');
   }
 
 }