You are here

public function GeolocationJavascriptTest::testGoogleMapFormatter in Geolocation Field 8.3

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

Tests the Google Maps formatter.

File

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

Class

GeolocationJavascriptTest
Tests the JavaScript functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

public function testGoogleMapFormatter() {
  $this
    ->drupalGet('node/3');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-map-container');

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