Stub the Arkose public key alongside arkose_enabled?

What does this MR do and why?

The sign-up and identity verification forms use Arkose Labs for bot detection. The components expect a public key to render the widget. In production, the Rails helper only reports arkose_enabled? true when a public key is configured, so a key is always present. The feature spec helper stub_arkose_token_verification only stubbed arkose_enabled? alone. The Rails helper compacts nil values, so data-api-key was omitted from the page data. The JavaScript code then mounted the Arkose apps with publicKey: undefined, causing a prop validation warning.

The warning is: prop "publicKey". Expected String, got Undefined in SignUpArkoseApp and IdentityVerificationArkoseApp.

Fix: the spec helper also stubs arkose_public_api_key with a placeholder string. This is a spec-only change.

Changes made:

  • ee/spec/support/helpers/identity_verification_helpers.rb

How to set up and validate locally

  1. Run the feature spec ee/spec/features/registrations/email_opt_in_registration_spec.rb.
  2. Check the browser console output in the failure log shows no [Vue warn] line for this warning.
  3. Alternatively, open the sign-up page on an instance with Arkose configured and verify the widget loads.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

References

🤖 Generated with Claude Code

Edited by Miguel Rincon

Merge request reports

Loading
Loading