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

[Cypress] Add static colorMode for test environment #8066

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Oct 9, 2024

Summary

In this previous PR we removed the default colorMode on EuiProvider in favor of listening to system settings.
This causes issues in testing environments because our tests assert on LIGHT mode (e.g. color values). Tests will fail when the system setting is set to DARK mode because of this.

Changes

  • adds static colorMode="light" on the wrapping EuiProvider for cypress tests

QA

  • CI passes
  • verify system settings have no affect on tests:
    • checkout this PR
    • set the local system setting for color mode to "dark"
    • run yarn test-cypress-dev and run the test for data_grid_cell.styles.spec.ts
    • verify the test does not fail

- ensures that tests always run in LIGHT mode independent of system setting
@mgadewoll mgadewoll marked this pull request as ready for review October 9, 2024 08:22
@mgadewoll mgadewoll requested a review from a team as a code owner October 9, 2024 08:22
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

🎉 🚀

@cee-chen cee-chen merged commit f3a08e4 into elastic:main Oct 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants