Git Product home page Git Product logo

Comments (6)

ahuth avatar ahuth commented on June 9, 2024

Super weird, and thanks for the bug report, @tstewart15!

The error message makes it seem like window.axeQueue is getting clobbered:

return window.axeQueue.add(() => window.axe.run(document, options));

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.

tstewart15 avatar tstewart15 commented on June 9, 2024

@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.
image

from axe-storybook-testing.

ahuth avatar ahuth commented on June 9, 2024

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.

tstewart15 avatar tstewart15 commented on June 9, 2024

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.

ahuth avatar ahuth commented on June 9, 2024

Thanks for looking into it!

I think both of these resolutions make sense:

  1. Like you said, skip running axe-storybook-testing on that story for now.
  2. 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.

ahuth avatar ahuth commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.