public function ModerationDashboardComponentsTest::testModerationActivityChartWithoutData in Moderation Dashboard 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/ModerationDashboardComponentsTest.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardComponentsTest::testModerationActivityChartWithoutData()
Tests the empty moderation activity chart.
File
- tests/
src/ Functional/ ModerationDashboardComponentsTest.php, line 99
Class
- ModerationDashboardComponentsTest
- Tests moderation dashboard components.
Namespace
Drupal\Tests\moderation_dashboard\FunctionalCode
public function testModerationActivityChartWithoutData() {
$this
->drupalGet('/user/' . $this->user
->id() . '/moderation-dashboard');
$drupal_js_settings = $this
->getDrupalSettings();
$this
->assertTrue(!isset($drupal_js_settings['moderation_dashboard_activity']));
$moderation_activity_element = $this
->assertSession()
->elementExists('css', '.block-moderation-dashboard-activity');
$this
->assertNotSame(FALSE, strpos($moderation_activity_element
->getText(), 'There has been no editor activity within the last month.'));
}