public function TourJavascriptTest::testQueryArg in Drupal 10
Same name and namespace in other branches
- 9 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');
}