-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: make browsertest failures standout #4148
feat: make browsertest failures standout #4148
Conversation
okay, so there aren't tests for the html reporter. |
Why isn't this merged? |
2c7ea84
to
57b7aac
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1ec3d2d
to
761ad90
Compare
17f5583
to
2a0efa0
Compare
2c4cdaf
to
22710c0
Compare
d39bb86
to
53a8536
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
127aeba
to
1b88126
Compare
This comment was marked as resolved.
This comment was marked as resolved.
903c70e
to
c44aa80
Compare
c44aa80
to
7433483
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
87e5cb8
to
35fd52e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
76d3e61
to
d125e4a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
setting package-lock.json back to last update added in sass and updated css class to use extend updated test files to expect sass
0f368b3
to
c9b2939
Compare
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 think we'll want to have some more discussion into what this UI should look like. Proposal: can we have that in the backing issue, #792? That way we can figure out what it should look like a bit more before jumping into the implementation.
@@ -144,6 +144,7 @@ | |||
"rollup-plugin-node-globals": "^1.4.0", | |||
"rollup-plugin-node-polyfills": "^0.2.1", | |||
"rollup-plugin-visualizer": "^4.1.0", | |||
"sass": "^1.39.2", |
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.
[Structure] sass
is a pretty big dependency to use for exactly one @extend
. I don't think it's justified here. Let's revert the change from .css
to .sass
, unless there's a strong reason for it?
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.
Removed in #5218 ;)
} | ||
|
||
#mocha-stats.fail { | ||
@extend #mocha-stats; |
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.
[Style] I don't think this @extend
is really needed. We can achieve the same result in raw CSS, such as with CSS variables or different class names.
Thinking in terms of semantic class names, I think it'd make sense to have a class like .fail
, .pass
, etc. that each define their own colors.
Answering #4148 (comment): no, CSS can overcome these issues. 🙂
@@ -111,7 +111,6 @@ function HTML(runner, options) { | |||
hideSuitesWithout('test fail'); | |||
} | |||
}); | |||
|
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.
[Style] Nit: unnecessary change?
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.
Looking at the styles:
Pass | Fail |
---|---|
A few things that make me not a fan yet:
- The new colors are hard to read on top of, to the point of not having accessible color contrast.
- The colors also don't match the existing aesthetic of the page. The page right now has very minimalist colors and a subtle design. This new green and red is pretty glaring. We should go with something that doesn't clash so much.
- It's a little inconsistent in how its laid out: more padding on the top vs. the bottom, and less horizontal padding than other UI elements.
I'm not sure what would be the "right" approach. A few things come to mind, but I haven't thought very deeply:
- Using much thinner border lines and/or much less saturated colors
- Even switching to an nprogress-style bar on the stats header or the page
- Instead of a background or border, using bold & colored text
(I'm not convinced any of that is better, just ideating)
👋 ping @dhuang612, do you still have time for this? |
Closing out as it's been a while since PR activity. If anybody wants to take this over, please do - and post a co-author attribution if you take code from this PR. Cheers! 🤎 |
@JoshuaKGoldberg I'll be coming to this one as a software engineer at Microsoft specializing in a11y :) I'll be contributing as an individual, not on behalf of Microsoft. Please let me know if you have further comments before I start resolving the existing ones. I'll probably be asking for some help in the discord as well :) thanks again for picking up this project! |
Description of the Change
resolves #792 created a bar that starts out as green when the tests start.
Then if one of the tests fails bar will turn red to indicate test failure.
From the previous attempt learned that code coverage is decreased.
Will work on creating a test for this to get this resolved.
Alternate Designs
Why should this be in core?
Benefits
Allows for less eye movement to notice tests that don't pass when run from google chrome.
Possible Drawbacks
there shouldn't be any side effects because the changes are gui level
changes made are an enhancement.
when the tests first begin:
when a failure is detected: