X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Ftest%2Fjavascript.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Ftest%2Fjavascript.twig;h=a1cfbdb00ac63d88ae4216da12d29383d3a5ba6e;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/test/javascript.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/test/javascript.twig new file mode 100644 index 000000000..a1cfbdb00 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d8/test/javascript.twig @@ -0,0 +1,40 @@ +drupalCreateUser(); + $this->drupalLogin($admin_user); + + $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()); + } + +}