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

test(commonTests): improve themed error messages #9481

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented May 31, 2024

✨🧪🧰✨

Test/Assertion failure messages should provide more context now:

 FAIL  src/components/action-pad/action-pad.e2e.ts (7.262 s)
  ● calcite-action-pad › theme › default › is themeable

    expect(received).toBe(expected) // Object.is equality

    Expected: "[--calcite-action-pad-trigger-background-color-active:--calcite-action-group-trigger-background-color-active] rgb(0, 191, 255)"
    Received: "[--calcite-action-pad-trigger-background-color-active:--calcite-action-group-trigger-background-color-active] "
 FAIL  src/components/handle/handle.e2e.ts
  ● calcite-handle › theme › selected › is themeable

    expect(received).toBe(expected) // Object.is equality

    Expected: "[--calcite-handle-background-color-selected:backgroundColor] rgb(0, 191, 255)"
    Received: "[--calcite-handle-background-color-selected:backgroundColor] rgba(0, 0, 0, 0)"
 FAIL  src/components/action-group/action-group.e2e.ts (5.418 s)
  ● calcite-action-group › theme › is themeable

    [--calcite-action-group-trigger-background-color-hover] target node (calcite-action-group >>> calcite-action) must be clickable (larger than 1x1) for state: hover

      380 |             })`;

Note: this depends on #9450.

@jcfranco jcfranco requested a review from a team as a code owner May 31, 2024 18:44
@jcfranco jcfranco changed the title test: update themed to handle pseudoelements and special underline styling case test(commonTests): improve themed error messages May 31, 2024
@jcfranco jcfranco changed the title test(commonTests): improve themed error messages test(commonTests): improve themed error messages May 31, 2024
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@alisonailea alisonailea left a comment

Choose a reason for hiding this comment

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

Noice

@jcfranco jcfranco merged commit 0956bad into epic/7180-component-tokens Jun 4, 2024
3 of 4 checks passed
@jcfranco jcfranco deleted the jcfranco/7180-improve-themed-failure-messages branch June 4, 2024 22:19
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