$password_confirm_widget->
fillField('Password', 'o'
);
$this->
assertFalse($password_confirm_item->
find('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"]'
)->
isVisible());
$this->
assertTrue($password_confirm_item->
find('css', "
$password_confirm_selector + .password-suggestions > ul > li"
)->
isVisible());
$this->assert->
elementContains('css', "
$password_confirm_widget_selector $password_parent_selector", '<div aria-live="polite" aria-atomic="true" class="password-strength__title">Password strength: <span class="password-strength__text" data-drupal-selector="password-strength-text">Weak</span></div>'
);
// Now fill both the main and confirm input.
$password_confirm_widget->
fillField('Password', 'oooooooooO0∘'
);
$password_confirm_widget->
fillField('Confirm password', 'oooooooooO0∘'
);
// Bar should be 100% wide.
$this->assert->
elementAttributeContains('css', 'input.js-password-field + .password-strength > [data-drupal-selector="password-strength-meter"] [data-drupal-selector="password-strength-indicator"]', 'style', 'width: 100%;'
);
$this->assert->
elementTextContains('css', "
$password_confirm_widget_selector $password_parent_selector [data-drupal-selector='password-strength-text']", 'Strong'
);
// Password match message must be visible.
$this->
assertTrue($password_confirm_item->
find('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"]'
)->
isVisible());
$this->
assertTrue($password_confirm_item->
find('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"] > [data-drupal-selector="password-match-status-text"]'
)->
hasClass('ok'
));
$this->assert->
elementTextContains('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"] > [data-drupal-selector="password-match-status-text"]', 'yes'
);
// Password suggestions should get invisible.
$this->
assertFalse($password_confirm_item->
find('css', "
$password_confirm_selector + .password-suggestions"
)->
isVisible());
} /**
* Ensures that password match message is visible when widget is initialized.
*/