public function WebformUiElementJavaScriptTest::testElement in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_ui/tests/src/FunctionalJavascript/WebformUiElementJavaScriptTest.php \Drupal\Tests\webform_ui\FunctionalJavascript\WebformUiElementJavaScriptTest::testElement()
Tests element.
File
- modules/
webform_ui/ tests/ src/ FunctionalJavascript/ WebformUiElementJavaScriptTest.php, line 29
Class
- WebformUiElementJavaScriptTest
- Tests webform UI element JavasScript.
Namespace
Drupal\Tests\webform_ui\FunctionalJavascriptCode
public function testElement() {
$page = $this
->getSession()
->getPage();
$assert_session = $this
->assertSession();
/**************************************************************************/
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/structure/webform/manage/contact/element/add/textfield');
// Check 'destination' element key warning.
$title = $page
->findField('properties[title]');
$title
->setValue('destination');
$assert_session
->waitForText("Please avoid using the reserved word 'destination' as the element's key.");
// Check 'form_id' element key warning.
$title = $page
->findField('properties[title]');
$title
->setValue('destination');
$assert_session
->waitForText("Please avoid using the reserved word 'destination' as the element's key.");
}