Comments (6)
Super weird, and thanks for the bug report, @tstewart15!
The error message makes it seem like window.axeQueue
is getting clobbered:
Can you try running with axe turned off for the BasePage
stories, please? Just want to rule out any pollution coming from other stories.
I'll work on making it less possible for that to happen, and will push up a beta version of the package to try out.
from axe-storybook-testing.
@ahuth Good call! Disabling the test for BasePage allowed the remaining tests to work as-expected. I suspect it has something to do with the isFullPageStory
option, since this is the only test which includes this parameter.
from axe-storybook-testing.
Interesting. Do you know how isFullPageStory
is being used in your project? I don't believe that's built-in to Storybook (or at least it's not an option I'm familiar with).
Is it being used by something that does anything with window
? Or is it being used by a Storybook addon?
from axe-storybook-testing.
Ya, it's something being added in our project (sorry, I'm new to the project in addition to being new to Storybook in general, so I assumed it was coming from Storybook).
It appears when isFullPageStory
is set, we clear the Preview DOM and replace it. I'm guessing we do this to test our components which represent the full document (ie. include head
and body
).
I suspect the resolution here is that axe-storybook-testing simply can't support this and we'll just need to skip this Story test (or attempt to fix this so that axe-storybook works on our side)?
from axe-storybook-testing.
Thanks for looking into it!
I think both of these resolutions make sense:
- Like you said, skip running axe-storybook-testing on that story for now.
- On our end, I'll work on making axe-storybook-testing more resilient against things inadvertently modifying the globals it needs.
from axe-storybook-testing.
Closing this as I think the short-term path forward is not running axe on the story in question.
Let me know if there's anything else I can do to help, or if you run into more issues.
from axe-storybook-testing.
Related Issues (16)
- Conver to use ES modules?
- Global disabledRules config option HOT 3
- Running same axe-storybook command produces inconsistent results HOT 17
- Color Contrast discrepancy HOT 8
- Axe-storybook misidentifying background color HOT 4
- Storybook 6.4 support HOT 3
- Unexpected token error when running axe-storybook as part of CI HOT 4
- Script always fails with error "Storybook object not found on window. Open your storybook and check the console for errors." HOT 13
- Add option to pass axe options as a story parameter HOT 1
- Error with Storybook 6.5.0-alpha.64 HOT 5
- Support selectors for disabledRule HOT 5
- Allow timeout to be specified on individual stories
- reporter options markdown and doc fail to run tests HOT 2
- Github actions - Error when run axe-storybook with chromatic HOT 3
- Option to only fail on certain impact levels HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axe-storybook-testing.