You are here

public function GeolocationGoogleGeocoderWidgetTest::testGeocoderWidgetMapPresent in Geolocation Field 8.2

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

Tests the Google Maps widget.

File

tests/src/FunctionalJavascript/GeolocationGoogleGeocoderWidgetTest.php, line 126

Class

GeolocationGoogleGeocoderWidgetTest
Tests the Google Geocoder Widget functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

public function testGeocoderWidgetMapPresent() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('node/3/edit');
  $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-"]');
}