ClaroPasswordConfirmWidgetTest.php in Drupal 9
File
core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php
View source
<?php
namespace Drupal\FunctionalJavascriptTests\Theme;
use Drupal\Tests\user\FunctionalJavascript\PasswordConfirmWidgetTest;
class ClaroPasswordConfirmWidgetTest extends PasswordConfirmWidgetTest {
protected $defaultTheme = 'claro';
public function testPasswordConfirmMessage() {
$this
->drupalGet($this->testUser
->toUrl('edit-form'));
$password_confirm_widget_selector = '.js-form-type-password-confirm.js-form-item-pass';
$password_confirm_selector = '.js-form-item-pass-pass2';
$password_confirm_widget = $this->assert
->elementExists('css', $password_confirm_widget_selector);
$password_confirm_item = $password_confirm_widget
->find('css', $password_confirm_selector);
$this
->assertTrue($password_confirm_item
->has('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"]'));
$this
->assertFalse($password_confirm_item
->find('css', 'input.js-password-confirm + [data-drupal-selector="password-confirm-message"]')
->isVisible());
}
public function testFillConfirmOnly() {
}
}