Commit Graph

8 Commits

Author SHA1 Message Date
Fábio Oliveira
d9bf9d423e Snapshottable preview configuration (#3494) 2025-03-21 15:39:12 +01:00
Bruno Pantaleão Gonçalves
0773a9a8fc Revert "Create SharedTesting framework target" (#3493)
Reverts home-assistant/iOS#3487
2025-03-20 11:18:58 +01:00
Fábio Oliveira
ab4de6a1f5 Create SharedTesting framework target (#3487)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
Put together a technique to reuse previews to generate and assert
snapshots.
This either saves time writing snapshot tests or makes snapshot tests
more useful by using them as previews.

This is implemented in a couple of libraries already
([example](https://github.com/BarredEwe/Prefire)). Went with a simple
implementation here but a library can be adopted to leverage additional
features and support.

To hold the code for snapshotting, a new framework was introduced,
SharedTesting, to collect all the utilities built for testing. It must
only be imported in test targets.

The preview side of the code lives in the Shared framework.

Applying this new technique will come in a separate PR.

[Original PR](https://github.com/home-assistant/iOS/pull/3484)

---------

Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2025-03-20 09:33:55 +01:00
Zac West
c77d4464c2 Github Actions cleanup and linting additions (#1461)
Adds some new linters: YamlLint (YAML files) and RuboCop (Ruby files). Moves SwiftLint to our own runner. All three of these have built-in GitHub Actions output formats, so we don't need to do anything special to have them work. Applies YAML and Ruby cleanup.

Adds some short-circuit logic for caching to speed up various Actions. Adds a flag to make Firebase optionally use xcframeworks for test builds so they don't need to compile them. We only need to build it for release builds since they lack the ARM Mac slices.
2021-02-04 23:27:26 -08:00
Zac West
194cc154a7 Add menu to status item on right-click (#1420)
## Summary
Adds a basic menu structure to the status item. This includes:

- Toggling the app (e.g. activate or deactivate)
- Performing actions
- Opening About, Checking for Updates, opening Preferences and Quitting

## Screenshots
<img width="259" alt="Screen Shot 2021-01-24 at 22 51 24" src="https://user-images.githubusercontent.com/74188/105670916-b59cf580-5e96-11eb-9143-19ac5d4af92c.png"><img width="260" alt="Screen Shot 2021-01-24 at 22 51 16" src="https://user-images.githubusercontent.com/74188/105670921-b6ce2280-5e96-11eb-9c25-eddf4bb7ae12.png">

## Any other notes
There's not a clean way to do the left/right click handling. There's a few ways, all with their own pluses and negatives:
- Calling `popUpMenu(_:)` programmatically works, but it's marked as deprecated and it's tough to get Swift to not care.
- Handling `menuWillOpen` to instead do the left-click behavior and abort the menu display.
2021-01-25 15:26:56 -08:00
Zac West
6695e8ed16 Mark patch-level ccov as informational only (#1417) 2021-01-24 12:51:36 -08:00
Zac West
486acedc0b Switch from red to orange for alerts (#1416)
## Summary
Changes the alerts to be more distinct - orange (stolen from the home-assistant.io page) instead of red.

## Screenshots
![Image 2](https://user-images.githubusercontent.com/74188/105641887-3a5a2600-5e3b-11eb-88c0-acfae616f2fc.png)
<img width="400" alt="Screen Shot 2021-01-24 at 11 49 58" src="https://user-images.githubusercontent.com/74188/105641889-3dedad00-5e3b-11eb-8139-6071fcbc16fb.png"><img width="400" alt="Screen Shot 2021-01-24 at 11 49 50" src="https://user-images.githubusercontent.com/74188/105641890-3f1eda00-5e3b-11eb-8924-66496a63a2a9.png">
2021-01-24 12:29:20 -08:00
Zac West
b80c874917 Add code coverage reporting to tests (#1412)
Adds code coverage reports to pull requests. Enabling code coverage gathering appears to be about a 25% increase in build time, unfortunately, so just enabling it for the App/Shared targets and doing it in a separate scheme so it doesn't impact local build times.
2021-01-24 10:53:43 -08:00