f7e6dc8ff528caec5927a5cfe67f810809a06325
[yaffs-website] / web / core / modules / config / tests / src / FunctionalJavascript / ConfigEntityTest.php
1 <?php
2
3 namespace Drupal\Tests\config\FunctionalJavascript;
4
5 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
6
7 /**
8  * Tests the Config operations through the UI.
9  *
10  * @group config
11  */
12 class ConfigEntityTest extends WebDriverTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public static $modules = ['config_test'];
18
19   /**
20    * Tests ajax operations through the UI on 'Add' page.
21    */
22   public function testAjaxOnAddPage() {
23     $this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
24
25     $page = $this->getSession()->getPage();
26     $assert_session = $this->assertSession();
27
28     $this->drupalGet('admin/structure/config_test/add');
29     // Test that 'size value' field is not show initially, and it is show after
30     // selecting value in the 'size' field.
31     $this->assertNull($page->findField('size_value'));
32     $page->findField('size')->setValue('custom');
33     $this->assertNotNull($assert_session->waitForField('size_value'));
34   }
35
36 }