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.

(feat) Ignore attributes

See original GitHub issue

Is your feature request related to a problem? Please describe.

I have an app that is built with styled-components so all classNames are generated randomly.

Describe the solution you’d like

Some option like ignoreAttributes would fit.

That’d be nice to skip classNames so snapshots will work properly.

E.g. instead of this:

-    <div class="sc-bdVaJa sc-bwzfXH Primitives__Page-sc-12hrqp0-4 gQrDDx">
18 	-      <h1
19 	-        font-size="calc(1.8em + 5vw)"
20 	-        font-weight="bold"
21 	-        class="sc-bdVaJa sc-htpNat sc-bxivhb jcKHLF"
22 	-      >
23 	-        Komfy
24 	-      </h1>

I would see this:

-    <div>
18 	-      <h1
19 	-        font-size="calc(1.8em + 5vw)"
20 	-        font-weight="bold"
21 	-      >
22 	-        Komfy
23 	-      </h1>

Describe alternatives you’ve considered Image snapshots

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:11
  • Comments:9

github_iconTop GitHub Comments

4reactions
Vandiviercommented, Oct 7, 2019

ignoreAttributes should be an array which can include string or regex

I am using angular to prerender a static site and view encapsulation generates attributes prefixed with _ngcontent- and then a hash is appended. For example _ngcontent-vga-c1

3reactions
talentlessguycommented, Sep 18, 2019

@skozin “Support ignoring certain attributes” sounds awesome.

So it can look like:

{
  ...,
  ignoreAttributes: ['style', 'class']
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Does the Gunner feat ignore the reloading properties of guns?
In my game, I am an artificer with the gunner feat who came across a gun that has a reload 1. Since the...
Read more >
Feats - Star Wars Saga Edition Wiki - Fandom
Choose the Feats you feel best represent your character's interests and capabilities. Each character gets one Feat when the character is created (at...
Read more >
Feat Tree - d20PFSRD
Feat Prerequisites Feat Type(s) Source Abundant Revelations Mystery class feature G PRG:UM Accursed Hex Hex class feature G PRG:UM Acrobatic — G PRG:CRB
Read more >
The D&D Feats Guide You Need to Read - Cats and Dice
Every D&D character has a class and race which come with special traits. ... If you don't know what D&D feats are or...
Read more >
DnD 5e - Spellcasting Feats Breakdown - RPGBOT.net
Choosing the right feat the right spells can be a hugely impactful ... I recommend ignoring this option both because it's unpredictable, ...
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