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

fix: force languages in cypress browser for tests #8049

Merged
merged 14 commits into from
Sep 3, 2024
Merged

Conversation

gastonfournier
Copy link
Contributor

@gastonfournier gastonfournier commented Sep 2, 2024

To fix this we had to create a free trial account on cypress and enable the recording of the test. That way we found out the issue was with a locale:
image (38)

Probably, this works well locally because our local machines do have a default locale, but probably we don't have one when running in CI, and millify library is causing the tests to fail specifically at this line:

username: `Total: ${millify(users.length)}`,
(validated here).

Unfortunately, upgrading millify didn't help, but downgrading to v5 (which doesn't support locales), solve the issue at the cost of not having the up-to-date library: #8048

I believe the issue is related to this locale c reported here: cypress-io/cypress#7890 (comment) because only after overriding the languages this worked

Copy link

vercel bot commented Sep 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 10:03am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 3, 2024 10:03am

Copy link
Contributor

github-actions bot commented Sep 2, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@gastonfournier gastonfournier changed the title Force locale in cypress test fix: force languages in cypress browser for tests Sep 3, 2024
@gastonfournier gastonfournier marked this pull request as ready for review September 3, 2024 10:02
This was referenced Sep 3, 2024
Copy link
Member

@nunogois nunogois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gastonfournier gastonfournier enabled auto-merge (squash) September 3, 2024 10:06
@gastonfournier gastonfournier merged commit acecffd into main Sep 3, 2024
12 checks passed
@gastonfournier gastonfournier deleted the force-locale branch September 3, 2024 10:06
@chriswk
Copy link
Member

chriswk commented Sep 3, 2024

Ok, not trying to sound aggressive, but why are we even using millify here? Is it that important to get thousand separators?

@gastonfournier
Copy link
Contributor Author

Ok, not trying to sound aggressive, but why are we even using millify here? Is it that important to get thousand separators?

We're only using it in a few places and we're consciously adding it for things like: #7879

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.

3 participants