ConfigEntityTest.php in Drupal 10
File
core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php
View source
<?php
namespace Drupal\Tests\config\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
class ConfigEntityTest extends WebDriverTestBase {
protected static $modules = [
'config_test',
];
protected $defaultTheme = 'stark';
public function testAjaxOnAddPage() {
$this
->drupalLogin($this
->drupalCreateUser([
'administer site configuration',
]));
$page = $this
->getSession()
->getPage();
$assert_session = $this
->assertSession();
$this
->drupalGet('admin/structure/config_test/add');
$this
->assertNull($page
->findField('size_value'));
$page
->findField('size')
->setValue('custom');
$this
->assertNotNull($assert_session
->waitForField('size_value'));
}
}