-
Notifications
You must be signed in to change notification settings - Fork 63
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
Results being overwritten when same url but different actions #98
Comments
I have a large set of tests, some of which test the same SPA url but in different states. We have adopted a practice of appending |
This issue can be especially confusing because different reporters can report different results based on the which events are implemented. The core issue is that the results for a URL in the aggregated But, the reporters that handle the {
"defaults": {
"includeWarnings": true
},
"urls": [
"https://pa11y.org/",
{
"url": "https://pa11y.org/",
"timeout": 5
}
]
} results in: Running Pa11y on 2 URLs:
> https://pa11y.org/ - 2 errors
> https://pa11y.org/ - Failed to run
Errors in https://pa11y.org/:
• Error: Pa11y timed out (5ms)
✘ 0/2 URLs passed I've used the same technique that @kkoskelin mentioned above of appending querystring parameters to differentiate, and usually I want that because it lets me identify what I did in
I like change the behavior approach because then results are consistently reported. There's already precedence for output with different URLs (see #172). As an indication of the very subtle differences you can see now, running the previous example removing the trailing slash on the URL: {
"defaults": {
"includeWarnings": true
},
"urls": [
"https://pa11y.org",
{
"url": "https://pa11y.org",
"timeout": 5
}
]
} Does results in the correct output (since the first is successful, so the reported URL is Running Pa11y on 2 URLs:
> https://pa11y.org/ - 2 errors
> https://pa11y.org - Failed to run
Errors in https://pa11y.org/:
• Img element is marked so that it is ignored by Assistive Technology.
(html > body > div > header > a > img)
• The heading structure is not logically nested. This h3 element should be an h2 to be properly nested.
(#pa11y-1)
<h3 id="pa11y-1"><a href="https://github.com/pa1...</h3>
Errors in https://pa11y.org:
• Error: Pa11y timed out (5ms)
✘ 0/2 URLs passed @joeyciechanowicz @josebolos Thoughts on this? Edited to correct the config to include warnings, which are what's represented in the output. |
One follow-up thought - in some cases the querystring is modified by the app through |
The query string workaround seems more brittle, due to it breaking when the browser or actions update it My vote would be for the first option, to detect duplicates. However with a slight modification, that it passes an incremented identifier as a |
Adding some kind of |
I wanted to put this out for any comments on formatting or approach. I have an update that accepts an optional As an illustration, this config: {
"defaults": {
"reporters": [["json", { "fileName": "./results.json" }]]
},
"urls": [
"https://pa11y.org",
{
"url": "https://pa11y.org",
"description": "test something"
},
{
"url": "https://pa11y.org",
"description": "test something else"
},
{
"url": "https://pa11y.org",
"description": "test something"
}
]
} results in: {
"total": 4,
"passes": 4,
"errors": 0,
"results": {
"https://pa11y.org/": [],
"https://pa11y.org/ - test something": [],
"https://pa11y.org/ - test something else": [],
"https://pa11y.org/ - test something (2)": []
}
} This processing is done when saving results, so only effects the object passed to the I assume the documentation would list |
I have a SPA so I would like to test different actions that don't necessarily change the URL. However when I see the results I only see the errors from the most recent test. I have a piece of my config below as an example.
This gives the following result if the third test failed even if the first two had errors
The text was updated successfully, but these errors were encountered: