function TourJavascriptTest::testQueryArg
Same name in other branches
- 10 core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php \Drupal\Tests\tour\FunctionalJavascript\TourJavascriptTest::testQueryArg()
- 11.x core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php \Drupal\Tests\tour\FunctionalJavascript\TourJavascriptTest::testQueryArg()
Confirm the 'tips' and 'tour 'query arguments.
File
-
core/
modules/ tour/ tests/ src/ FunctionalJavascript/ TourJavascriptTest.php, line 44
Class
- TourJavascriptTest
- General Tour tests that require JavaScript.
Namespace
Drupal\Tests\tour\FunctionalJavascriptCode
public function testQueryArg() {
$assert_session = $this->assertSession();
$this->drupalGet('tour-test-1');
$assert_session->assertNoElementAfterWait('css', '.tip-tour-test-1');
$assert_session->pageTextContains('Where does the rain in Spain fail?');
$assert_session->pageTextNotContains('Im all these things');
$assert_session->pageTextNotContains('The first tip');
$this->drupalGet('tour-test-1', [
'query' => [
'tips' => 'tip-tour-test-6',
],
]);
$this->assertNotNull($assert_session->waitForElementVisible('css', '.tip-tour-test-6'));
$assert_session->pageTextContains('Im all these things');
$this->drupalGet('tour-test-1', [
'query' => [
'tour' => '1',
],
]);
$this->assertNotNull($assert_session->waitForElementVisible('css', '.tip-tour-test-1'));
$assert_session->pageTextContains('The first tip');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.