localgov_directories-3.3.1/modules/localgov_directories_org/tests/Functional/DirectoryOrgTest.php
modules/localgov_directories_org/tests/Functional/DirectoryOrgTest.php
<?php
namespace Drupal\Tests\localgov_directories_org\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\node\Traits\NodeCreationTrait;
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
/**
* Tests localgov directories organisation content type.
*
* @group localgov_directories
*/
class DirectoryOrgTest extends BrowserTestBase {
use NodeCreationTrait;
use AssertBreadcrumbTrait;
/**
* Skip schema checks.
*
* @var string[]
*/
protected static $configSchemaCheckerExclusions = [
// Missing schema:
// - 'content.location.settings.reset_map.position'.
// - 'content.location.settings.weight'.
'core.entity_view_display.localgov_geo.area.default',
'core.entity_view_display.localgov_geo.area.embed',
'core.entity_view_display.localgov_geo.area.full',
'core.entity_view_display.geo_entity.area.default',
'core.entity_view_display.geo_entity.area.embed',
'core.entity_view_display.geo_entity.area.full',
// Missing schema:
// - content.location.settings.geometry_validation.
// - content.location.settings.multiple_map.
// - content.location.settings.leaflet_map.
// - content.location.settings.height.
// - content.location.settings.height_unit.
// - content.location.settings.hide_empty_map.
// - content.location.settings.disable_wheel.
// - content.location.settings.gesture_handling.
// - content.location.settings.popup.
// - content.location.settings.popup_content.
// - content.location.settings.leaflet_popup.
// - content.location.settings.leaflet_tooltip.
// - content.location.settings.map_position.
// - content.location.settings.weight.
// - content.location.settings.icon.
// - content.location.settings.leaflet_markercluster.
// - content.location.settings.feature_properties.
'core.entity_form_display.geo_entity.address.default',
'core.entity_form_display.geo_entity.address.inline',
// Missing schema:
// - content.postal_address.settings.providers.
// - content.postal_address.settings.geocode_geofield.
'core.entity_form_display.localgov_geo.address.default',
'core.entity_form_display.localgov_geo.address.inline',
];
/**
* Test breadcrumbs in the Standard profile.
*
* @var string
*/
protected $profile = 'testing';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* A user with permission to bypass content access checks.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* The node storage.
*
* @var \Drupal\node\NodeStorageInterface
*/
protected $nodeStorage;
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'localgov_directories_org',
'field_ui',
];
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->adminUser = $this->drupalCreateUser([
'bypass node access',
'administer nodes',
'administer node fields',
]);
}
/**
* Verifies basic functionality with all modules.
*/
public function testDirectoryVenueFields() {
$this->drupalLogin($this->adminUser);
$this->drupalGet('/admin/structure/types/manage/localgov_directories_org/fields');
$this->assertSession()->pageTextContains('body');
$this->assertSession()->pageTextContains('localgov_directory_phone');
$this->assertSession()->pageTextContains('localgov_directory_channels');
$this->assertSession()->pageTextContains('localgov_directory_email');
$this->assertSession()->pageTextContains('localgov_directory_website');
$this->assertSession()->pageTextContains('localgov_directory_facets_select');
$this->assertSession()->pageTextContains('localgov_directory_files');
$this->assertSession()->pageTextContains('localgov_directory_notes');
}
}
