Improve feature specs that involve solving Arkose challenge
From !149820 (comment 1886981950).
Instead of rendering a hidden input on the page that feature specs manipulate to simulate user solved challenge
event, consider using something like cy.intercept()
.
We could do something like,
- Stub request to
https://gitlab-api.arkoselabs.com/v2/.../api.js
to return a JS file that renders a button on the page. Clicking the button would trigger the passedonCompleted
handler (passArkoseLabsChallenge
method in this case) - In our feature specs, click on the button
- Run assertions on the page