You are here

protected function ConditionalFieldTestBase::baseTestSteps in Conditional Fields 4.x

Same name and namespace in other branches
  1. 8 tests/src/FunctionalJavascript/ConditionalFieldTestBase.php \Drupal\Tests\conditional_fields\FunctionalJavascript\ConditionalFieldTestBase::baseTestSteps()

Base steps for all javascript tests.

116 calls to ConditionalFieldTestBase::baseTestSteps()
ConditionalFieldCheckboxesTest::testVisibleValueAnd in tests/src/FunctionalJavascript/ConditionalFieldCheckboxesTest.php
Target field is Visible when control field has value with AND condition.
ConditionalFieldCheckboxesTest::testVisibleValueNot in tests/src/FunctionalJavascript/ConditionalFieldCheckboxesTest.php
Target field is Visible when control field has value with NOT condition.
ConditionalFieldCheckboxesTest::testVisibleValueOr in tests/src/FunctionalJavascript/ConditionalFieldCheckboxesTest.php
Target field is Visible when the control field has value with OR condition.
ConditionalFieldCheckboxesTest::testVisibleValueRegExp in tests/src/FunctionalJavascript/ConditionalFieldCheckboxesTest.php
Target field is Visible when the control field has value from regex.
ConditionalFieldCheckboxesTest::testVisibleValueWidget in tests/src/FunctionalJavascript/ConditionalFieldCheckboxesTest.php
The target field is Visible when the control field has value from Widget.

... See full list

1 method overrides ConditionalFieldTestBase::baseTestSteps()
ConditionalFieldsUserTest::baseTestSteps in tests/src/FunctionalJavascript/Entity/ConditionalFieldsUserTest.php
Base steps for all javascript tests.

File

tests/src/FunctionalJavascript/ConditionalFieldTestBase.php, line 138

Class

ConditionalFieldTestBase
Base setup for ConditionalField tests.

Namespace

Drupal\Tests\conditional_fields\FunctionalJavascript

Code

protected function baseTestSteps() {
  $admin_account = $this
    ->createUser([
    'view conditional fields',
    'edit conditional fields',
    'delete conditional fields',
    'administer nodes',
    'create article content',
    'administer content types',
  ]);
  $this
    ->drupalLogin($admin_account);

  // Visit a ConditionalFields configuration page that requires login.
  $this
    ->drupalGet('admin/structure/conditional_fields');

  // Configuration page contains the `Content` entity type.
  $this
    ->assertSession()
    ->pageTextContains('Content');

  // Content link exists.
  $this
    ->assertSession()
    ->linkByHrefExists('/admin/structure/conditional_fields/node');

  // Visit a ConditionalFields configuration page for Content bundles.
  $this
    ->drupalGet('admin/structure/conditional_fields/node');

  // Configuration page contains the `Article` bundle of Content entity type.
  $this
    ->assertSession()
    ->pageTextContains('Article');
  $this
    ->assertSession()
    ->linkByHrefExists('admin/structure/conditional_fields/node/article');

  // Visit a ConditionalFields configuration page for Article CT.
  $this
    ->drupalGet('admin/structure/conditional_fields/node/article');
  $this
    ->assertSession()
    ->pageTextContains('Target field');
}