class ConfigExportTest
Same name and namespace in other branches
- 11.x core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php \Drupal\Tests\config\FunctionalJavascript\ConfigExportTest
Tests the config export form.
@group config
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase implements \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\config\FunctionalJavascript\ConfigExportTest implements \Drupal\FunctionalJavascriptTests\WebDriverTestBase
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of ConfigExportTest
File
-
core/
modules/ config/ tests/ src/ FunctionalJavascript/ ConfigExportTest.php, line 12
Namespace
Drupal\Tests\config\FunctionalJavascriptView source
class ConfigExportTest extends WebDriverTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'config',
'system',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests Ajax form functionality on the config export page.
*/
public function testAjaxOnExportPage() {
$this->drupalLogin($this->drupalCreateUser([
'export configuration',
]));
$page = $this->getSession()
->getPage();
// Check that the export is empty on load.
$this->drupalGet('admin/config/development/configuration/single/export');
$this->assertSession()
->fieldValueEquals('export', '');
// Check that the export is filled when selecting a config name.
$page->selectFieldOption('config_name', 'system.site');
$this->assertSession()
->assertWaitOnAjaxRequest();
$this->assertSession()
->fieldValueNotEquals('export', '');
// Check that the export is emptied again when selecting a config type.
$page->selectFieldOption('config_type', 'Action');
$this->assertSession()
->assertWaitOnAjaxRequest();
$this->assertSession()
->fieldValueEquals('export', '');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.