question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<Progress /> dynamic aria disrupts Jest snapshotting

See original GitHub issue

The aria-describedby property inside the <Progress /> component seems to be dynamically generated every render, which makes Jest snapshot testing of pages using that component impossible, as they will fail on every run.

To reproduce: Drop the component in a place where you run a Jest Snapshot test. Generate the snapshot then run the test again.

Screenshot 2020-01-16 14 04 49

The above screenshot is a default <Progress /> component, no Props set, no dynamic data otherwise.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rachael-phillipscommented, Jan 21, 2020

@lallmon thanks for opening this, and we’ll take a look at this!

0reactions
stale[bot]commented, Mar 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why jest snapshots can be harmful — practical examples
Jest is a popular framework for testing JavaScript, and Jest snapshot is a method for creating ... The issue is that the aria-label...
Read more >
Snapshot Testing - Jest
Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
Read more >
Accessible Rich Internet Applications (WAI-ARIA) 1.2 - W3C
Declaration of these roles on elements within dynamic web content is intended to support interoperability between the web content and assistive ...
Read more >
Third-Party Notices and/or Licenses - Oracle Help Center
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,...
Read more >
Change log for 4.8.42
#268 · Bug 1986992: Handle kube-apiserver disruption more gracefully. ... fix: remove stray } from end of aria-label in delete dialog #8484 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found