stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

Resolving Cypress Error 500

Open isaacismaelx14 opened this issue 1 year ago • 2 comments

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)

image

image

cc @bigcommerce/storefront-team

isaacismaelx14 avatar Jun 16 '23 16:06 isaacismaelx14

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.)

jairo-bc avatar Jun 26 '23 17:06 jairo-bc

@isaacismaelx14 Is it something you are working on?

jairo-bc avatar Apr 03 '24 09:04 jairo-bc