Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable GRecaptcha in e2e tests #52

Closed
brunoocasali opened this issue Feb 26, 2021 · 0 comments · Fixed by #76
Closed

Disable GRecaptcha in e2e tests #52

brunoocasali opened this issue Feb 26, 2021 · 0 comments · Fixed by #76

Comments

@brunoocasali
Copy link
Contributor

Hello, how is everything?

My case involves more performance gains in e2e tests than anything else.
Currently my authentication flows need captcha to work and this is expected for security reasons,
the big question is that using captcha in test environments is very expensive, as it involves downloading the google library,
and generate its configuration (which takes time, mainly in unstable or bad connections as it happens in emerging countries like Brazil - where I am at the moment).

The idea in this case, is to create a kind of "fallback" / "mock" for the GRecaptcha functions so that the fake captcha flows continue to work in test.

What I thought was to add an option:

// controller

isActive = window.ENABLE_RECAPTCHA // (each app will have their owns)
<GRecaptcha
  @sitekey={{this.recaptchaKey}}
  @onSuccess={{action this.onSuccess}}
  @onExpired={{action this.onExpired}}
  @size="invisible"
  @active={{this.isActive}}
/>

With this kind of control, we could only enable recaptcha when is really needed.

PS: I can work on this improvement ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant