ConfigExportTest.php in Drupal 9
File
core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
View source
<?php
namespace Drupal\Tests\config\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
class ConfigExportTest extends WebDriverTestBase {
protected static $modules = [
'config',
'system',
];
protected $defaultTheme = 'stark';
public function testAjaxOnExportPage() {
$this
->drupalLogin($this
->drupalCreateUser([
'export configuration',
]));
$page = $this
->getSession()
->getPage();
$this
->drupalGet('admin/config/development/configuration/single/export');
$this
->assertSession()
->fieldValueEquals('export', '');
$page
->selectFieldOption('config_name', 'system.site');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertSession()
->fieldValueNotEquals('export', '');
$page
->selectFieldOption('config_type', 'Action');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertSession()
->fieldValueEquals('export', '');
}
}