WebformCardsUiJavaScriptTest.php in Webform 6.x
File
modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsUiJavaScriptTest.php
View source
<?php
namespace Drupal\Tests\webform_cards\FunctionalJavaScript;
use Drupal\Tests\webform\FunctionalJavascript\WebformWebDriverTestBase;
class WebformCardsUiJavaScriptTest extends WebformWebDriverTestBase {
public static $modules = [
'block',
'webform',
'webform_ui',
'webform_cards',
'webform_cards_test',
];
protected static $testWebforms = [
'test_form_wizard_basic',
];
public function testUi() {
$this
->placeBlocks();
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/structure/webform/manage/contact');
$this
->assertElementVisible('#webform-ui-add-page');
$this
->assertElementVisible('#webform-ui-add-card');
$this
->drupalGet('/admin/structure/webform/manage/test_cards_progress');
$this
->assertElementNotVisible('#webform-ui-add-page');
$this
->assertElementVisible('#webform-ui-add-card');
$this
->drupalGet('/admin/structure/webform/manage/test_form_wizard_basic');
$this
->assertElementVisible('#webform-ui-add-page');
$this
->assertElementNotVisible('#webform-ui-add-card');
}
}