Commit 37ce9e5c authored by alexpott's avatar alexpott

Issue #2073875 by nick_schuch: Fixed TourTestBase needs to allow for list elements in the body.

parent c1c38a9b
......@@ -55,7 +55,7 @@ public function testTourFunctionality() {
// Navigate to tour-test-1 and verify the tour_test_1 tip is found with appropriate classes.
$this->drupalGet('tour-test-1');
$elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', array(
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 even last',
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 odd first',
':data_id' => 'tour-test-1',
':text' => 'The first tip',
));
......@@ -69,7 +69,7 @@ public function testTourFunctionality() {
$this->assertTourTips();
$elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', array(
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 even last',
':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 odd first',
':data_id' => 'tour-test-1',
':href' => url('<front>', array('absolute' => TRUE)),
':text' => 'Drupal',
......
......@@ -38,7 +38,7 @@ public function assertTourTips($tips = array()) {
// Get the rendered tips and their data-id and data-class attributes.
if (empty($tips)) {
// Tips are rendered as <li> elements inside <ol id="tour">.
$rendered_tips = $this->xpath('//ol[@id = "tour"]//li');
$rendered_tips = $this->xpath('//ol[@id = "tour"]//li[starts-with(@class, "tip")]');
foreach ($rendered_tips as $rendered_tip) {
$attributes = (array) $rendered_tip->attributes();
$tips[] = $attributes['@attributes'];
......
......@@ -21,3 +21,11 @@ tips:
weight: "1"
attributes:
data-id: tour-test-3
tour-test-6:
id: tour-test-6
plugin: text
label: Im a list
body: <p>Im all these things:</p><ul><li>Modal</li><li>Awesome</li></ul>
weight: "6"
attributes:
data-id: tour-test-3
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