You are here

protected property ModerationDashboardComponentsTest::$moderationElements in Moderation Dashboard 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/ModerationDashboardComponentsTest.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardComponentsTest::moderationElements

Elements to test.

An array of text asserts keyed by the CSS selector of the element to assert.

  • contains: array of strings which have to be found.
  • not_contains: array of strings shouldn't be found.

Type: array

File

tests/src/Functional/ModerationDashboardComponentsTest.php, line 21

Class

ModerationDashboardComponentsTest
Tests moderation dashboard components.

Namespace

Drupal\Tests\moderation_dashboard\Functional

Code

protected $moderationElements = [
  // Content in review.
  '.view-id-content_moderation_dashboard_in_review.view-display-id-block_1' => [],
  // Content drafts.
  '.view-id-content_moderation_dashboard_in_review.view-display-id-block_2' => [
    'contains' => [
      'Draft node',
    ],
    'not_contains' => [
      'Published node',
    ],
  ],
  // Editor activity for the last 30 days.
  '.block-moderation-dashboard-activity' => [],
  // Recent updates.
  '.view-id-moderation_dashboard_recent_changes.view-display-id-block_1' => [
    'contains' => [
      'Published node',
      'Draft node',
    ],
  ],
  // Recently created.
  '.view-id-moderation_dashboard_recently_created.view-display-id-block_1' => [
    'contains' => [
      'Published node',
      'Draft node',
    ],
  ],
  // Your drafts.
  '.view-id-content_moderation_dashboard_in_review.view-display-id-block_3' => [
    'contains' => [
      'Draft node',
    ],
    'not_contains' => [
      'Published node',
    ],
  ],
  // Your activity.
  '.view-id-moderation_dashboard_recent_changes.view-display-id-block_2' => [
    'contains' => [
      'Published node',
      'Draft node',
    ],
  ],
  // Content you created.
  '.view-id-moderation_dashboard_recently_created.view-display-id-block_2' => [
    'contains' => [
      'Published node',
      'Draft node',
    ],
  ],
];