Skip to content
Snippets Groups Projects
Commit 66150693 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2099471 by clemens.tolboom: Report the total number and modal tips tests.

parent d32275c3
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -51,6 +51,8 @@ public function assertTourTips($tips = array()) {
}
else {
// Check for corresponding page elements.
$total = 0;
$modals = 0;
foreach ($tips as $tip) {
if (!empty($tip['data-id'])) {
$elements = \PHPUnit_Util_XML::cssSelect('#' . $tip['data-id'], TRUE, $this->content, TRUE);
......@@ -60,7 +62,13 @@ public function assertTourTips($tips = array()) {
$elements = \PHPUnit_Util_XML::cssSelect('.' . $tip['data-class'], TRUE, $this->content, TRUE);
$this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', array('%data-class' => $tip['data-class'])));
}
else {
// It's a modal.
$modals++;
}
$total++;
}
$this->pass(format_string('Total %total Tips tested of which %modals modal(s).', array('%total' => $total, '%modals' => $modals)));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment