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

Implement system notifications infrastructure #26687

Closed
astone123 opened this issue May 7, 2023 · 5 comments · Fixed by #26773
Closed

Implement system notifications infrastructure #26687

astone123 opened this issue May 7, 2023 · 5 comments · Fixed by #26773
Assignees

Comments

@astone123
Copy link
Contributor

astone123 commented May 7, 2023

We need the Cypress app to be able to send notifications to a user's operating system. Add logic and tests in the data-context package that allows us to do this. We should use the Electron notifications API. Please read the investigation write up which includes links to a proof-of-concept branch as well as other findings.

Acceptance Criteria

  • Automated tests are written to show that the Cypress app can trigger system notifications via the Electron notifications API
  • Notifications are manually tested and verified to work for the Cypress app on macOS, Windows, and Linux operating systems
@astone123
Copy link
Contributor Author

@lmiller1990
Copy link
Contributor

I cannot imagine how you write an End to End test to verify the system notification is actually sent with our current test infrastructure. I suspect you will just stub out the seam between Electron -> OS. We can reasonably assume Electron's Notification API does what it says it does.

@lmiller1990
Copy link
Contributor

@astone123 can you clarify what kind of information the notification should have? It is just some text? Any actions (yAlso, should we think about the UX around notifications? I'm not sure how much control we've got, but I think there's a few types of notifications.

  • ones you MUST dimiss
  • time based (goes away after N seconds)

Some can have options

image

For this ticket, would it be okay to just have a basic one with some text that auto-dismisses? I don't like the ones that force me to dismiss them (interrupts my workflow). WDYT?

@astone123
Copy link
Contributor Author

@lmiller1990 yeah, for automated testing we'll just mock the Electron API and make sure that we're calling the correct methods, and then assume that Electron is working correctly. That's why I added the part about manually verifying that they work on each OS.

I don't think we need to make decisions about the behavior or actions on the notifications just yet. Those can easily be configured on a per-notification basis, so we can figure out those details later. For this ticket, we can have it auto-dismiss for simplicity, but it won't matter much since we won't have the logic to actually trigger them yet.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 7, 2023

Released in 12.14.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.14.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants