Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
55
vendor/chi-teck/drupal-code-generator/templates/d8/test/webdriver.twig
vendored
Normal file
55
vendor/chi-teck/drupal-code-generator/templates/d8/test/webdriver.twig
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\{{ machine_name }}\FunctionalJavascript;
|
||||
|
||||
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
|
||||
|
||||
/**
|
||||
* Tests the JavaScript functionality of the {{ name }} module.
|
||||
*
|
||||
* @group {{ machine_name }}
|
||||
*/
|
||||
class {{ class }} extends WebDriverTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['{{ machine_name }}'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
// Set up the test here.
|
||||
}
|
||||
|
||||
/**
|
||||
* Test callback.
|
||||
*/
|
||||
public function testSomething() {
|
||||
// Let's test password strength widget.
|
||||
\Drupal::configFactory()->getEditable('user.settings')
|
||||
->set('verify_mail', FALSE)
|
||||
->save();
|
||||
|
||||
$this->drupalGet('user/register');
|
||||
|
||||
$page = $this->getSession()->getPage();
|
||||
|
||||
$password_field = $page->findField('Password');
|
||||
$password_strength = $page->find('css', '.js-password-strength__text');
|
||||
|
||||
$this->assertEquals('', $password_strength->getText());
|
||||
|
||||
$password_field->setValue('abc');
|
||||
$this->assertEquals('Weak', $password_strength->getText());
|
||||
|
||||
$password_field->setValue('abcABC123!');
|
||||
$this->assertEquals('Fair', $password_strength->getText());
|
||||
|
||||
$password_field->setValue('abcABC123!sss');
|
||||
$this->assertEquals('Strong', $password_strength->getText());
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue