we have many recaptcha v3 requests (like POST: https://www.google.com/recaptcha/api2/reload?k=XXXX) on the tested website.
That slows down the tests and make them less stable.
Recaptcha will be not verified on server on test environment, so we don't really need it (until production e2e test).
We wanted to stub the requests completely, but the client js code should receive something for actions to work.
right now we stub with global support/index.ts:
before(() => {
cy.log('ignore google recaptcha');
cy.intercept('POST', '**/*google.com/recaptcha/api2/**', { statusCode: 200, body: `["rresp","",null,null,null,""]` });
});
do you know alternative / bettter solution for this problem?