Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Statistics] Dashboard Override #9010

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
28 changes: 25 additions & 3 deletions modules/dashboard/test/DashboardTest.php
Expand Up @@ -358,30 +358,52 @@ public function testDashboardRecruitmentView()
$this->safeGet($this->url . '/dashboard/');
$views = $this->safeFindElement(
WebDriverBy::cssSelector(
"#statistics_widgets .panel:nth-child(1) .views button"
"#statistics_widgets .panel:nth-child(2) .views button"
)
);
$views->click();

$assertText1 = $this->safeFindElement(
WebDriverBy::cssSelector(
"#statistics_widgets .panel:nth-child(1)".
"#statistics_widgets .panel:nth-child(2)".
" .dropdown-menu li:nth-child(1)"
)
)->getText();

$assertText2 = $this->safeFindElement(
WebDriverBy::cssSelector(
"#statistics_widgets .panel:nth-child(1)".
"#statistics_widgets .panel:nth-child(2)".
" .dropdown-menu li:nth-child(2)"
)
)->getText();

$assertText3 = $this->safeFindElement(
WebDriverBy::cssSelector(
"#statistics_widgets .panel:nth-child(2)".
" .dropdown-menu li:nth-child(3)"
)
)->getText();

$assertText4 = $this->safeFindElement(
WebDriverBy::cssSelector(
"#statistics_widgets .panel:nth-child(2)".
" .dropdown-menu li:nth-child(4)"
)
)->getText();

$this->assertStringContainsString("Recruitment - overall", $assertText1);
$this->assertStringContainsString(
"Recruitment - site breakdown",
$assertText2
);
$this->assertStringContainsString(
"Recruitment - project breakdown",
$assertText3
);
$this->assertStringContainsString(
"Recruitment - cohort breakdown",
$assertText4
);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions modules/statistics/css/WidgetIndex.css
@@ -0,0 +1,3 @@
.c3-tooltip-container {
top: 0px !important;
}