bigcommerce / stencil-cli

BigCommerce Stencil emulator for local theme development
https://developer.bigcommerce.com/stencil-docs
BSD 4-Clause "Original" or "Old" License
102 stars 141 forks source link

Resolving Cypress Error 500 #1114

Open isaacismaelx14 opened 1 year ago

isaacismaelx14 commented 1 year ago

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

jairo-bc commented 1 year ago

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 commented 4 months ago

@isaacismaelx14 Is it something you are working on?