WebformUiElementActionsTest.php in Webform 8.5
File
modules/webform_ui/tests/src/Functional/WebformUiElementActionsTest.php
View source
<?php
namespace Drupal\Tests\webform_ui\Functional;
use Drupal\Tests\webform\Functional\WebformBrowserTestBase;
class WebformUiElementActionsTest extends WebformBrowserTestBase {
public static $modules = [
'filter',
'webform',
'webform_ui',
];
public function testActionsElements() {
$this
->drupalLogin($this->rootUser);
$values = [
'id' => 'test',
];
$elements = [
'text_field' => [
'#type' => 'textfield',
'#title' => 'textfield',
],
];
$this
->createWebform($values, $elements);
$this
->drupalGet('/admin/structure/webform/manage/test');
$this
->assertLink('Customize');
\Drupal::configFactory()
->getEditable('webform.settings')
->set('element.excluded_elements.webform_actions', 'webform_actions')
->save();
$this
->drupalGet('/admin/structure/webform/manage/test');
$this
->assertNoLink('Customize');
}
}