Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving Cypress Error 500 #1114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isaacismaelx14
Copy link

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 isaacismaelx14 changed the title Cypress error on load Resolving Cypress Error 500 Jun 16, 2023
@jairo-bc
Copy link
Contributor

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
Copy link
Contributor

jairo-bc commented Apr 3, 2024

@isaacismaelx14 Is it something you are working on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants