You are here

public function GeolocationJavascriptTest::testGoogleMapFormatter in Geolocation Field 8

Same name and namespace in other branches
  1. 8.3 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 200

Class

GeolocationJavascriptTest
Tests the JavaScript functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

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

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