GeolocationViewsSettingsTest.php in Geolocation Field 8.3
File
tests/src/Functional/GeolocationViewsSettingsTest.php
View source
<?php
namespace Drupal\Tests\geolocation\Functional;
use Drupal\Tests\BrowserTestBase;
class GeolocationViewsSettingsTest extends BrowserTestBase {
public static $modules = [
'node',
'field',
'views',
'taxonomy',
'geolocation',
'geolocation_demo',
'geolocation_google_maps',
'geolocation_google_maps_demo',
'views_ui',
];
protected $defaultTheme = 'stark';
public function testViewsMapSettings() {
$permissions = [
'access administration pages',
'administer views',
];
$admin_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($admin_user);
$this
->drupalGet('admin/structure/views/view/geolocation_demo_common_map');
$this
->clickLink('Settings');
$edit = [
'style_options[centre][fit_bounds][enable]' => 1,
];
$this
->submitForm($edit, 'Apply');
}
public function testViewsProximitySettings() {
$permissions = [
'access administration pages',
'administer views',
];
$admin_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($admin_user);
$this
->drupalGet('admin/structure/views/view/geolocation_demo_proximity_filter_sort');
$this
->clickLink('Content: Geolocation Demo Single - Proximity Form');
$edit = [
'options[center][coordinates][enable]' => 1,
];
$this
->submitForm($edit, 'Apply');
}
}