protected function ConditionalFieldsUserTest::baseTestSteps in Conditional Fields 4.x
Same name and namespace in other branches
- 8 tests/src/FunctionalJavascript/Entity/ConditionalFieldsUserTest.php \Drupal\Tests\conditional_fields\FunctionalJavascript\Entity\ConditionalFieldsUserTest::baseTestSteps()
Base steps for all javascript tests.
Overrides ConditionalFieldTestBase::baseTestSteps
1 call to ConditionalFieldsUserTest::baseTestSteps()
- ConditionalFieldsUserTest::testUserEntity in tests/
src/ FunctionalJavascript/ Entity/ ConditionalFieldsUserTest.php - Test CF for User CT.
File
- tests/
src/ FunctionalJavascript/ Entity/ ConditionalFieldsUserTest.php, line 124
Class
- ConditionalFieldsUserTest
- Test Conditional Fields check User entity.
Namespace
Drupal\Tests\conditional_fields\FunctionalJavascript\EntityCode
protected function baseTestSteps() {
$user = $this
->drupalCreateUser([
'administer users',
'administer account settings',
'view conditional fields',
'edit conditional fields',
'delete conditional fields',
]);
$this
->drupalLogin($user);
// Visit a ConditionalFields configuration page that requires login.
$this
->drupalGet('admin/structure/conditional_fields');
// Configuration page contains the `User` entity type.
$this
->assertSession()
->pageTextContains('User');
// Visit a ConditionalFields configuration page for User bundles.
$this
->drupalGet('admin/structure/conditional_fields/user');
// Visit a ConditionalFields configuration page for User.
$this
->drupalGet('admin/structure/conditional_fields/user/user');
}