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

[EuiTextTruncate] Fix testenv mocks #7234

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Commits on Sep 29, 2023

  1. Move CanvasTextUtils out from EuiTextTruncate to services/

    - separating it from EuiTextTruncate utils makes it easier to mock without shenanigans
    
    - since it's being used outside of truncation contexts, might as well make it a generic service
    cee-chen committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    a22c727 View commit details
    Browse the repository at this point in the history
  2. Update testenv mocks

    - to only mock the canvas util (which is the one with Jest dependency issues, not the text truncation util itself)
    cee-chen committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    0f0d476 View commit details
    Browse the repository at this point in the history
  3. Update tests

    - move canvas tests out of text_truncate
    
    - update existing method of mocking canvas width, since the new `testenv` file now allows bypassing setting `HTMLCanvasElement`
    cee-chen committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    f8b3bf5 View commit details
    Browse the repository at this point in the history
  4. changelog

    cee-chen committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    6e4aa21 View commit details
    Browse the repository at this point in the history