-
Notifications
You must be signed in to change notification settings - Fork 41
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
tagless component assertion too aggressive #290
Comments
see #204 (comment) and the following comments |
Okay. I'll likely have time in the next day or two to PR the change suggested at the end of that thread. However, now that we're talking about writing code to disable the code that sometimes spuriously tells us that the code we wrote to help test the code isn't going to help us test the code, I'm still wondering if it's worth it. What value do we think this assertion provides that is worth this extra complexity? I don't think it's ever saved me any time/effort, and between figuring out how to silence the deprecation warning so it didn't clutter up my test output, and now this, it's cost me handful of hours, so I'm wondering if we have any evidence that others have the opposite experience. |
yes, see the original issue that caused this to change from deprecation to error |
To be clear, I'm trying to understand why we want to keep this as an assertion -- an alternative could be to remove it, or to just downgrade it back to a warning. Reading #204 more closely, I see part of the source of my confusion. #204's description and referenced commit have to do with the So agreed, the original report and #204 are good evidence that at least a warning is needed. It's not clear to me that one person's report of missing the warning is sufficient justification for upgrading it to an assertion now that we know that it's caused several people's test suites to break. And since my personal experience is of having my test suite break, I certainly recognize my bias here 😸 So, I'll move forward with the PR, but would request that before merging it you spend 30 more seconds thinking this over to make sure you really think that based on what we know now, upgrading from a warning to an assertion is still the right decision. |
Resolved by #323 |
I have a couple of tagless pass-through components that forward most of their arguments (including test selectors) to a contained component. I used to silence the deprecation warnings about
data-test-*
attributes on tagless components, but now that it's a hard assert I have to do this:😭😭😭😭😭
Could we devise some way to disable this assertion, either on a component-by-component basis, or globally? Options I see:
data-test-ignore-tagless: true
(so it gets stripped out just like regular test selectors)config/environment.js
to globally disable the assertionI provide the last two as options because I find the assertion to be of pretty limited value -- all it could possibly be doing is giving you a clue as to why a test is failing, it could not possibly prevent an actual bug. While this may be helpful for beginners, asserting seems like a pretty extreme measure for such an un-severe issue. But if others feel differently, I'll happily concede the point and continue advocating for (1) or (2).
The text was updated successfully, but these errors were encountered: