You are here

public function ModerationDashboardTest::testModerationDashboard in Lightning Workflow 8.3

Tests basic functionality of Moderation Dashboard.

File

tests/src/Functional/ModerationDashboardTest.php, line 48

Class

ModerationDashboardTest
Tests Lightning Workflow's integration with Moderation Dashboard.

Namespace

Drupal\Tests\lightning_workflow\Functional

Code

public function testModerationDashboard() {
  $this
    ->drupalPlaceBlock('local_tasks_block');
  $account = $this
    ->drupalCreateUser([
    'use moderation dashboard',
    'view all revisions',
  ]);
  $this
    ->drupalLogin($account);
  $this
    ->getSession()
    ->getPage()
    ->clickLink('Moderation Dashboard');
  $this
    ->assertBlock('views_block:content_moderation_dashboard_in_review-block_1');
  $this
    ->assertBlock('views_block:content_moderation_dashboard_in_review-block_2');
  $this
    ->assertBlock('moderation_dashboard_activity');
  $this
    ->assertBlock('views_block:moderation_dashboard_recently_created-block_1');
  $this
    ->assertBlock('views_block:content_moderation_dashboard_in_review-block_3');
  $this
    ->assertBlock('views_block:moderation_dashboard_recent_changes-block_1');
  $this
    ->assertBlock('views_block:moderation_dashboard_recent_changes-block_2');
  $this
    ->assertBlock('views_block:moderation_dashboard_recently_created-block_2');
}