You are here

public function CanNotifyTest::testCanNotify in Create user permission 2.x

Test that we can check the "notify user" checkbox.

File

tests/src/FunctionalJavascript/CanNotifyTest.php, line 27

Class

CanNotifyTest
Test that "create users" able users can notify users about the new account.

Namespace

Drupal\Tests\create_user_permission\Functional

Code

public function testCanNotify() {
  $create_user = $this
    ->drupalCreateUser([
    'create users',
  ]);
  $this
    ->drupalLogin($create_user);

  // Go to the add person page.
  $this
    ->drupalGet('admin/people/create');

  // Check that the "notify" thing is available.
  $this
    ->assertTrue($this
    ->getSession()
    ->getPage()
    ->find('css', '#edit-notify')
    ->isVisible());
}