-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
test: final ct-audit tests and component tweaks #19948
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ FlakinessThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -421,6 +421,8 @@ function validateExternalLink (subject, options: ValidateExternalLinkOptions | s | |||
}) | |||
} | |||
|
|||
Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop limit exceeded')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is here because in CI there were 16 tests failing due to the error. The error itself is safe to ignore in that it doesn't represent something that blows up the UI and it's debatable that it should be an error instead of a warning. I'm open to suggestions for handling this differently though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exception has been a pain in the butt forever.
in order to render the virtual dom. Virtualized lists require stable containers and it | ||
can be tricky to debug after this has happened. | ||
--> | ||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can a conditional with v-if
be stable in the first place (what does stable mean, exactly?)
If we need a DOM node that will never change, we could use the v-once
directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point, "stable" was vague. I've moved the comment to be better placed, and updated the wording. The part with v-if
is OK coming and going, it's the next element that shouldn't follow the v-if
rule. We would have liked to use v-show but it clashed with tailwind's grid
class.
Maybe it's overdoing it to have this long comment in the first place, I think some "here be dragons" is useful for future developers, but there are tests now to catch regressions of the specific stuff this fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't fully understand the problem, I guess I need to pull and try it out - but that's okay, the comment should suffice. Hopefully I don't need to edit this anytime soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specific problem that this change fixes is that if the container element is not present in the DOM with when this code runs, it doesn't update the virtualized list, so "clearing the search" from the no-results state was broken, as the old v-if
had removed the element needed. @ZachJW34 has some ideas for making this more robust in general when we get a chance. But in this PR I just wanted to fix the bug I found when adding the coverage for that behavior, and give a bit of a here-be-dragons, because some of my first changes seemed to work great locally, but had actually broken the virtualization.
if (element) { |
@ZachJW34 @tbiethman I made a couple small changes since yesterday so tagged you to re-review when you get a chance. Tests are green now 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* 10.0-release: feat: validate specPattern root level (#19980) feat(unify): unsupported browsers (#19997) feat: persist isSideNavigationOpen (#20026) feat: add types for urqlCacheKeys (#20027) fix: rename spec.js to spec.cy.js (#20029) feat: waiting for dependencies to be installed in wizard (#19955) fix: migrate config fields to correct the location (#19940) feat: relaunch browser when switching testing types from app (#19961) test: final ct-audit tests and component tweaks (#19948)
User facing changelog
This PR addresses some problems noticed when writing tests for some the components, so there are some user-facing changes, mainly for keyboard and screen reader accessibility for our Cards and the Specs List. There is more that can be done, especially to make the main Specs List match the Inline Specs List keyboard behavior, but I think these are still improvements worth having.
Additional details
File by file, this PR:
v-show
preserves the DOM of the list even when hidden by the "no results" state.frontend-shared
(same version we already have)How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?