Skip to content
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

Closed

Conversation

dhuang612
Copy link

@dhuang612 dhuang612 commented Jan 9, 2020

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:
Screen Shot 2019-12-11 at 12 40 52 PM

when a failure is detected:
Screen Shot 2019-12-11 at 12 40 17 PM

@coveralls
Copy link

coveralls commented Jan 9, 2020

Coverage Status

Coverage decreased (-0.03%) to 94.378% when pulling 35fd52e on dhuang612:make-browsertest-failures-standout into 9e0369b on mochajs:master.

@dhuang612
Copy link
Author

okay, so there aren't tests for the html reporter.

@outsideris outsideris added the area: browser browser-specific label Jan 19, 2020
@dhuang612
Copy link
Author

reduced the size of the bar and gave them curved edges

success:
Screen Shot 2020-01-20 at 1 46 38 PM

failure:
Screen Shot 2020-01-20 at 1 50 11 PM

Please let me know if anything else needs to be changed

@pedro-qwkin
Copy link

Why isn't this merged?

@outsideris outsideris added the area: reporters involving a specific reporter label Nov 10, 2020
outsideris

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 2c7ea84 to 57b7aac Compare November 10, 2020 16:27
@dhuang612

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 1ec3d2d to 761ad90 Compare November 13, 2020 15:29
@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 17f5583 to 2a0efa0 Compare December 18, 2020 19:42
@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 2c4cdaf to 22710c0 Compare August 10, 2021 19:52
@dhuang612 dhuang612 requested a review from outsideris August 10, 2021 20:24
@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch 3 times, most recently from d39bb86 to 53a8536 Compare August 10, 2021 22:20
@juergba

This comment was marked as resolved.

@juergba juergba added qa semver-major implementation requires increase of "major" version number; "breaking changes" labels Aug 26, 2021
@juergba

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 127aeba to 1b88126 Compare August 26, 2021 20:41
@dhuang612

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 903c70e to c44aa80 Compare August 26, 2021 22:59
@juergba juergba force-pushed the make-browsertest-failures-standout branch from c44aa80 to 7433483 Compare August 27, 2021 06:46
@juergba

This comment was marked as resolved.

@juergba juergba added the run-browser-test run browser tests on forked PR if code is safe label Aug 27, 2021
@github-actions github-actions bot removed the run-browser-test run browser tests on forked PR if code is safe label Aug 27, 2021
@juergba

This comment was marked as resolved.

@juergba

This comment was marked as resolved.

@dhuang612

This comment was marked as resolved.

@juergba

This comment was marked as resolved.

@dhuang612

This comment was marked as resolved.

@dhuang612

This comment was marked as resolved.

@juergba

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch 2 times, most recently from 87e5cb8 to 35fd52e Compare August 27, 2021 19:36
@dhuang612

This comment was marked as resolved.

@juergba

This comment was marked as resolved.

@dhuang612

This comment was marked as resolved.

@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 76d3e61 to d125e4a Compare September 12, 2021 18:41
@dhuang612

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
@dhuang612 dhuang612 force-pushed the make-browsertest-failures-standout branch from 0f368b3 to c9b2939 Compare September 12, 2021 20:33
@JoshuaKGoldberg JoshuaKGoldberg added area: repository tooling concerning ease of contribution and removed area: qa labels Jan 2, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a 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",
Copy link
Member

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?

Copy link
Contributor

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;
Copy link
Member

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');
}
});

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Style] Nit: unnecessary change?

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg Mar 1, 2024

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
Screenshot of passing test with the PR's green background on the stats header Screenshot of failing test with the PR's red background on the stats header

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)

@JoshuaKGoldberg JoshuaKGoldberg added status: waiting for author waiting on response from OP - more information needed and removed semver-major implementation requires increase of "major" version number; "breaking changes" area: repository tooling concerning ease of contribution labels Mar 1, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title Make browsertest failures standout feat: make browsertest failures standout Mar 4, 2024
@JoshuaKGoldberg
Copy link
Member

👋 ping @dhuang612, do you still have time for this?

@JoshuaKGoldberg JoshuaKGoldberg added the stale this has been inactive for a while... label Jul 2, 2024
@JoshuaKGoldberg
Copy link
Member

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! 🤎

@mark-wiemer
Copy link
Contributor

mark-wiemer commented Sep 29, 2024

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: browser browser-specific area: reporters involving a specific reporter stale this has been inactive for a while... status: waiting for author waiting on response from OP - more information needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Highlight browser failures in red
7 participants