public function SimpleRecaptchaJavascriptTestBase::testLoginPage in Simple Google reCAPTCHA 8
Tests that the configuration page can be reached.
File
- tests/
src/ FunctionalJavascript/ SimpleRecaptchaJavascriptTestBase.php, line 83
Class
- SimpleRecaptchaJavascriptTestBase
- JavaScripts tests for the Simple reCAPTCHA module.
Namespace
Drupal\Tests\simple_recaptcha\FunctionalJavascriptCode
public function testLoginPage() {
$config = $this
->config('simple_recaptcha.config');
$this
->drupalGet('/user/login');
// reCAPTCHA site key exists in drupalSettings.
$this
->assertJsCondition('drupalSettings.simple_recaptcha.sitekey === "' . $config
->get('site_key') . '";');
}