public function GeolocationCommonMapAjaxJavascriptTest::testCommonMapAjax in Geolocation Field 8
Same name and namespace in other branches
- 8.3 tests/src/FunctionalJavascript/GeolocationCommonMapAjaxJavascriptTest.php \Drupal\Tests\geolocation\FunctionalJavascript\GeolocationCommonMapAjaxJavascriptTest::testCommonMapAjax()
- 8.2 tests/src/FunctionalJavascript/GeolocationCommonMapAjaxJavascriptTest.php \Drupal\Tests\geolocation\FunctionalJavascript\GeolocationCommonMapAjaxJavascriptTest::testCommonMapAjax()
Tests the CommonMap style.
File
- tests/
src/ FunctionalJavascript/ GeolocationCommonMapAjaxJavascriptTest.php, line 124
Class
- GeolocationCommonMapAjaxJavascriptTest
- Tests the common map style AJAX JavaScript functionality.
Namespace
Drupal\Tests\geolocation\FunctionalJavascriptCode
public function testCommonMapAjax() {
$this
->drupalGetFilterGoogleKey('geolocation-common-map-ajax-test');
$session = $this
->getSession();
$this
->assertSession()
->responseContains('Location 1');
$this
->assertSession()
->responseContains('Location 3');
$this
->submitForm([
'field_geolocation_boundary[lat_north_east]' => '53',
'field_geolocation_boundary[lng_north_east]' => '48',
'field_geolocation_boundary[lat_south_west]' => '51',
'field_geolocation_boundary[lng_south_west]' => '46',
], 'Apply', 'views-exposed-form-geolocation-common-map-ajax-test-page-1');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$html = $session
->getPage()
->getHtml();
$this
->assertContains('Location 1', $html);
$this
->assertNotContains('Location 3', $html);
}