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

fix(@jest/reporters): move missing icon file which is needed for NotifyReporter class #12593

Merged
merged 2 commits into from
Mar 24, 2022
Merged

fix(@jest/reporters): move missing icon file which is needed for NotifyReporter class #12593

merged 2 commits into from
Mar 24, 2022

Conversation

mrazauskas
Copy link
Contributor

Summary

Found accidentally. NotifyReporter class from @jest/reporters is referencing '../assets/jest_logo.png', but this file actually lives inside @jest/core.

The icon was added for node-notifier in #1170. For some reason I cannot make it work on MacOS. Might be it worked with growl (screenshots can be found in #5898). Perhaps it shows up on Windows?

Seems like jest-cli was massive. No wonder that one file got lost. Reporters were split into separate package in #7902, but the icon was moved later to @jest/core in #7696.

Does this make senses? (;

Test plan

Green CI.

@F3n67u
Copy link
Contributor

F3n67u commented Mar 23, 2022

For some reason I cannot make it work on macOS

do you allow notification for terminal-notifier? I can not make node-notifier work before I found out that I don't allow notification for terminal-notifier, see this issue: mikaelbr/node-notifier#403, hope it will helps

image

@mrazauskas
Copy link
Contributor Author

@F3n67u Yep. For some reason this was disabled by default.

I see the notifications, but Jest icon is not there (see screenshots in #5898). I was playing with examples from node-notifier repo, but these also do not show icons for me. Strange. I cannot check if moving that icon file is fixing anything. Perhaps on Windows? Perhaps there is no use of the icon?

@F3n67u
Copy link
Contributor

F3n67u commented Mar 23, 2022

@F3n67u Yep. For some reason this was disabled by default.

I see the notifications, but Jest icon is not there (see screenshots in #5898). I was playing with examples from node-notifier repo, but these also do not show icons for me. Strange. I cannot check if moving that icon file is fixing anything. Perhaps on Windows? Perhaps there is no use of the icon?

I cannot show icons for notification either. I am using the underly https://github.com/julienXX/terminal-notifier to test.

terminal-notifier -message "hello workdl" -appIcon '/Users/feng/dev/jest/packages/jest-reporters/assets/jest_logo.png'

image

I think this doc will be related, maybe when macOS upgrade the private method which -appIcon use is changed:

-appIcon PATH

Specify an image PATH to display instead of the application icon.

WARNING: This option is subject to change, since it relies on a private method.

from https://github.com/julienXX/terminal-notifier readme.

UPDATE:

there is a related bug report julienXX/terminal-notifier#283 which reports appIcon is not working on big sur. we could move our discussion there.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@SimenB SimenB merged commit 6056cd0 into jestjs:main Mar 24, 2022
@mrazauskas mrazauskas deleted the fix-notifier-move-logo branch March 24, 2022 08:12
@mrazauskas
Copy link
Contributor Author

Ah.. The icon issue on macOS is documented here: https://github.com/mikaelbr/node-notifier#macos-custom-icon-without-terminal-icon

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants