Skip to content

Grant all permissions in the E2E onboarding flow - #5620

Merged
bgoncal merged 3 commits into
mainfrom
bgoncal/e2e-onboarding-permissions
Sep 3, 2026
Merged

bgoncal merged 3 commits into
mainfrom
bgoncal/e2e-onboarding-permissions

Conversation

@bgoncal

@bgoncal bgoncal commented Sep 3, 2026

Copy link
Copy Markdown
Member

AI Policy

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Summary

Fixes the E2E workflow's artifact upload. The paths ended up on the failure report step added next to them, where the input is ignored, so every run failed on a missing path and saved nothing.

Onboarding now grants every permission rather than skipping and denying them. That covers what people actually tap, and it reaches the home network step, which the flow had never run: choosing the less secure local access level settles the decision on the spot and jumps to completion, so it was that choice rather than the denial that skipped it.

Taps that open or dismiss something now repeat until that has actually happened. A tap aimed at a screen still animating in lands on the backdrop behind it and is swallowed, while the tap itself reports success, which is what left the notification sheet and the sidebar sitting untouched and failed the run later somewhere unrelated.

Screenshots

Not a user-facing change.

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

The flow relaunches the app before opening settings from the frontend. Asking for that screen in the session that just onboarded crashes the app inside SwiftUI's navigation, which reproduces on iOS 26.5 and 27 and is worth its own fix; the relaunch keeps this test on its own subject until then.

Verified on CI and by three consecutive local runs against a real Home Assistant.

They ended up on the failure report added next to them, where the input is
ignored, so every run uploaded nothing and failed on the missing path.
Covers what people actually tap, and reaches the home network step, which
the flow skipped entirely before: choosing the less secure local access
level settles the decision on the spot and jumps to completion, so it was
never the denial that skipped it.

Taps that open or dismiss something now repeat until that has actually
happened. A tap aimed at a screen still animating in lands on the backdrop
behind it and is swallowed, while the tap itself reports success, which is
what left the notification sheet and the sidebar sitting untouched.
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The updated E2E UI test has a verified flaky/incorrect timeout fallback for in-app system alerts (and a couple of smaller issues) that can cause intermittent failures or unnecessary delays.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR stabilizes the nightly onboarding E2E workflow by (1) fixing artifact upload configuration so logs/recordings are actually captured, and (2) making the UI test flow closer to real user behavior by granting permissions and retrying taps that can be swallowed during UI transitions.

Changes:

  • Fix the E2E workflow artifact upload by moving path back onto the actions/upload-artifact step.
  • Update the onboarding E2E test to grant (rather than deny/skip) location and notification permissions, and to select the “most secure” local access option so the home network step is exercised.
  • Add retry-based helpers for dismissing transient UI and for tapping web elements until their expected UI effect is observable.
File summaries
File Description
Tests/UI/OnboardingE2ETests.swift Adjusts the E2E onboarding flow to grant permissions and adds retry helpers to reduce flakiness from swallowed taps.
.github/workflows/e2e.yml Fixes artifact upload by attaching path to the correct upload-artifact step.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Tests/UI/OnboardingE2ETests.swift
Comment thread Tests/UI/OnboardingE2ETests.swift
Comment thread Tests/UI/OnboardingE2ETests.swift Outdated
The sheet is posted a few seconds after the frontend paints, so waiting
for that first keeps a missing sheet from costing the whole frontend
budget. Also drops a doc comment left behind by a helper that is gone.
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.53%. Comparing base (acced47) to head (cdb869e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5620   +/-   ##
=======================================
  Coverage   33.52%   33.53%           
=======================================
  Files         993      993           
  Lines       72598    72598           
=======================================
+ Hits        24342    24344    +2     
+ Misses      48256    48254    -2     

see 4 files with indirect coverage changes

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal
bgoncal merged commit 4ff3f1e into main Sep 3, 2026
15 checks passed
@bgoncal
bgoncal deleted the bgoncal/e2e-onboarding-permissions branch September 3, 2026 11:15
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.

2 participants