Commit f2c62dc4 authored by l26yan's avatar l26yan
Browse files

ISTWCMS-4874 Test 'People' and 'Reports toolbar in Workbench

parent 0e8f2c18
...@@ -1436,9 +1436,18 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -1436,9 +1436,18 @@ class UwWcmsBasicTest extends BrowserTestBase {
foreach ($roles as $role) { foreach ($roles as $role) {
$this->drupalLogin($this->drupalUsers[$role]); $this->drupalLogin($this->drupalUsers[$role]);
$this->drupalGet('dashboard/my_dashboard'); $this->drupalGet('dashboard/my_dashboard');
if ($role != 'authenticated user') { if ($role != 'authenticated user') {
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains("Who's online"); $this->assertSession()->pageTextContains("Who's online");
if ($role == 'administrator' || $role == 'uw_role_site_owner') {
$this->assertSession()->linkExists('People');
$this->assertSession()->linkExists('Reports');
}
else {
$this->assertSession()->linkNotExists('People');
$this->assertSession()->linkNotExists('Reports');
}
} }
else { else {
$this->assertSession()->statusCodeEquals(403); $this->assertSession()->statusCodeEquals(403);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment