stencil-cli
stencil-cli copied to clipboard
Resolving Cypress Error 500
What?
I noticed that when running Cypress for your E2E tests, it returns a 500 error. This occurs because for some reason, Cypress fails to include the accept-language
header in the requests, resulting in an error during test execution.
To resolve this issue, I have made a modification by adding a validation step to check if request.headers['accept-language']
is undefined before applying the toLowerCase
method.
Screenshots (if appropriate)
cc @bigcommerce/storefront-team
Hi @isaacismaelx14, thanks for contributing to the repo! The Accept Language Header is coming from the browser settings. I think in order to have not empty, you should change that in the tests in Cypress or in the browser launcher (chrome, firefox, etc.)
@isaacismaelx14 Is it something you are working on?