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

Add tests, VSCode setup, and update dependencies #55

Merged
merged 14 commits into from
May 23, 2021
Merged

Add tests, VSCode setup, and update dependencies #55

merged 14 commits into from
May 23, 2021

Conversation

zacwest
Copy link
Member

@zacwest zacwest commented May 23, 2021

  • Steals the dependencies bump from Bump Firebase Functions Version #50, and adds in more bumping.
  • Adds launchable VSCode configs, which can run functions or tests, both with debugger.
  • Adds GitHub CI infrastructure for calling tests and reporting code coverage.
  • Adds basic tests for input/output of the legacy function.
  • Standardizes our horribly-inconsistent semicolon usage, apply auto-fixes around it.

@zacwest zacwest changed the title Add tests and VSCode setup Add tests, VSCode setup, and update dependencies May 23, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@d7008fe). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #55   +/-   ##
=========================================
  Coverage          ?   34.59%           
=========================================
  Files             ?        4           
  Lines             ?      370           
  Branches          ?        0           
=========================================
  Hits              ?      128           
  Misses            ?      242           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7008fe...96ecc80. Read the comment docs.

Copy link
Member

@robbiet480 robbiet480 left a comment

Choose a reason for hiding this comment

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

Hell yeah dawg. LGTM

@zacwest zacwest merged commit f01bf06 into master May 23, 2021
@zacwest zacwest deleted the tests branch May 23, 2021 21:37
zacwest added a commit to home-assistant/iOS that referenced this pull request Jun 8, 2021
Refs #1382 and home-assistant/core#50750.

## Summary
Uses (and requires) the core-2021.6 local push handling to subscribe to notification calls and show notifications without going through the Apple Push Notification Service.

## Screenshots
| Light | Dark |
| -- | -- |
| <img width="712" alt="Screen Shot 2021-06-06 at 18 08 59" src="https://user-images.githubusercontent.com/74188/120946730-57a8d600-c6f2-11eb-8dde-b03b42a0a03a.png"> | <img width="712" alt="Screen Shot 2021-06-06 at 18 09 09" src="https://user-images.githubusercontent.com/74188/120946737-5d9eb700-c6f2-11eb-8563-8d9b8d8e075b.png"> |

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#539

## Any other notes
- Only works on macOS for this first round. The iOS implementation will be the same manager, but needs extensions scaffolding that I have to put together separately.
- iOS will also likely have a setting to control this behavior, since it has potential battery implications; macOS doesn't have such concerns.
- Adds tests around the parsing of the raw notification payloads that uses the same tests introduced in home-assistant/mobile-apps-fcm-push#55.
- Shows the state of the local push connectivity in Notifications. With multi-server support, this will probably need to be broken down by server, or moved into the server-specific configurations.

This also sets us up to support encrypted notifications, since we're now able to handle the service call's data without any kind of remote manipulation. Unfortunately Apple declined the entitlement which makes this extremely easy, so we'll still need to handle the "commands are unencrypted" nonsense.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants