You are here

public function GeolocationCommonMapAjaxJavascriptTest::testCommonMap in Geolocation Field 8

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

Tests the CommonMap style.

File

tests/src/FunctionalJavascript/GeolocationCommonMapAjaxJavascriptTest.php, line 111

Class

GeolocationCommonMapAjaxJavascriptTest
Tests the common map style AJAX JavaScript functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

public function testCommonMap() {
  $this
    ->drupalGetFilterGoogleKey('geolocation-common-map-ajax-test');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-common-map-container');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-common-map-locations');

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