You are here

public function GeolocationLeafletJavascriptTest::testLeafletMap in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/GeolocationLeafletJavascriptTest.php \Drupal\Tests\geolocation\FunctionalJavascript\GeolocationLeafletJavascriptTest::testLeafletMap()

Tests the CommonMap style.

File

tests/src/FunctionalJavascript/GeolocationLeafletJavascriptTest.php, line 113

Class

GeolocationLeafletJavascriptTest
Tests the leaflet JavaScript functionality.

Namespace

Drupal\Tests\geolocation\FunctionalJavascript

Code

public function testLeafletMap() {
  $this
    ->drupalGet('geolocation-leaflet-test');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-map-container');
  $this
    ->assertSession()
    ->elementExists('css', '.geolocation-location');
  $result = $this
    ->assertSession()
    ->waitForElementVisible('css', 'img[title="Location 2"]');
  $this
    ->assertNotEmpty($result);
}