// The AJAX command in the response will update the DOM
$select =
$assertSession->
waitForElement('css', "div#ajax_selected_color:contains('
$item')"
);
$this->
assertNotNull($select, "DataCommand has updated the page with a value of
$item."
);
} // Verify form values of a checkbox element.
$session->
getPage()->
checkField('checkbox'
);
$div0 =
$this->
assertSession()->
waitForElement('css', "div#ajax_checkbox_value:contains('checked')"
);
$this->
assertNotNull($div0, 'DataCommand updates the DOM as expected when a checkbox is selected'
);
$session->
getPage()->
uncheckField('checkbox'
);
$div1 =
$this->
assertSession()->
waitForElement('css', "div#ajax_checkbox_value:contains('unchecked')"
);
$this->
assertNotNull($div1, 'DataCommand updates the DOM as expected when a checkbox is de-selected'
);
} /**
* Tests that AJAX elements with invalid callbacks return error code 500.
*/
public function testSimpleInvalidCallbacksAjaxFormValue() { $this->
drupalGet('ajax_forms_test_get_form'
);
$session =
$this->
getSession();