You are here

public function GeolocationJavascriptTest::testCommonMap in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/FunctionalJavascript/GeolocationJavascriptTest.php \Drupal\Tests\geolocation\FunctionalJavascript\GeolocationJavascriptTest::testCommonMap()
  2. 8 tests/src/FunctionalJavascript/GeolocationJavascriptTest.php \Drupal\Tests\geolocation\FunctionalJavascript\GeolocationJavascriptTest::testCommonMap()

Tests the CommonMap style.

File

tests/src/FunctionalJavascript/GeolocationJavascriptTest.php, line 186

Class

GeolocationJavascriptTest
Tests the JavaScript functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

public function testCommonMap() {
  $this
    ->drupalGet('geolocation-test');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-map-container');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-location');

  // If Google works, either gm-style or gm-err-container will be present.
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-map-container [class^="gm-"]');
}