3 namespace Drupal\system\Tests\Ajax;
6 * Tests that form elements in groups work correctly with AJAX.
10 class AjaxInGroupTest extends AjaxTestBase {
11 protected function setUp() {
14 $this->drupalLogin($this->drupalCreateUser(['access content']));
18 * Submits forms with select and checkbox elements via Ajax.
20 public function testSimpleAjaxFormValue() {
21 $this->drupalGet('/ajax_forms_test_get_form');
22 $this->assertText('Test group');
23 $this->assertText('AJAX checkbox in a group');
25 $this->drupalPostAjaxForm(NULL, ['checkbox_in_group' => TRUE], 'checkbox_in_group');
26 $this->assertText('Test group');
27 $this->assertText('AJAX checkbox in a group');
28 $this->assertText('AJAX checkbox in a nested group');
29 $this->assertText('Another AJAX checkbox in a nested group');