Add Join Server config URL tests on Windows/Linux#8595
Conversation
There was a problem hiding this comment.
Pull request overview
Adds cross-platform integration coverage for “Join Server” config URLs (UI + API) on Windows/Linux, and introduces stable widget keys needed for deterministic smoke testing.
Changes:
- Added Windows/Linux integration tests + shared harnesses for config-URL join/connect/disconnect flows (UI and API variants).
- Added stable
Keyhooks across server selection / join-private-server UI, plustileKey/fieldKey/buttonKeypassthroughs in shared widgets to support testing. - Updated CI workflows/scripts to run the new config-URL smoke tests when
JOIN_SERVER_CONFIG_URLSis available.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/features/vpn/server_selection.dart | Adds keys for navigation/options/private-server selection to support UI automation. |
| lib/features/vpn/location_setting.dart | Keys the home “location setting” tile for smoke navigation. |
| lib/features/private_server/join_private_server.dart | Keys join form fields/button and refreshes available servers after join. |
| lib/core/widgets/setting_tile.dart | Adds tileKey passthrough so the tappable InkWell can be keyed in tests. |
| lib/core/widgets/app_tile.dart | Adds tileKey passthrough so the inner ListTile can be keyed in tests. |
| lib/core/common/app_text_field.dart | Adds fieldKey passthrough to key the underlying TextFormField. |
| lib/core/common/app_buttons.dart | Adds buttonKey passthrough to key the underlying ElevatedButton. |
| integration_test/vpn/vpn_smoke_helpers.dart | New shared helper/finders for stable VPN smoke flows and debugging. |
| integration_test/vpn/connect_smoke_harness.dart | Refactors to reuse new helpers. |
| integration_test/vpn/config_url_test_env.dart | New env helpers for supplying config URLs/server name in CI. |
| integration_test/vpn/config_url_connect_smoke_harness.dart | New UI harness to join via config URL and verify connect/disconnect. |
| integration_test/vpn/config_url_api_smoke_harness.dart | New API harness to add server + connect/disconnect via LanternService. |
| integration_test/vpn/windows_config_url_smoke_test.dart | Windows UI config-URL smoke entrypoint. |
| integration_test/vpn/windows_config_url_api_smoke_test.dart | Windows API config-URL smoke entrypoint. |
| integration_test/vpn/linux_config_url_smoke_test.dart | Linux UI config-URL smoke entrypoint. |
| integration_test/vpn/linux_config_url_api_smoke_test.dart | Linux API config-URL smoke entrypoint. |
| .github/workflows/build-windows.yml | Plumbs config-URL env vars and increases timeout for Windows integration. |
| .github/workflows/build-linux.yml | Plumbs config-URL env vars and runs the new Linux config-URL smoke script. |
| .github/scripts/windows_connect_smoke.ps1 | Runs new Windows config-URL API + UI smoke tests when URL secret is set. |
| .github/scripts/linux_config_url_smoke.sh | Runs new Linux config-URL API + UI smoke tests (with secret written to temp file). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| content: error.localizedErrorMessage); | ||
| }, | ||
| (success) { | ||
| ref.read(availableServersProvider.notifier).forceFetchAvailableServers(); | ||
| context.hideLoadingDialog(); | ||
| appLogger.info("Successfully started joining private server."); |
There was a problem hiding this comment.
forceFetchAvailableServers() returns a Future<void>, but it’s currently invoked without await/unawaited. With flutter_lints, this typically triggers the unawaited_futures lint and can also race with subsequent UI updates. Consider either awaiting the refresh (and making the success branch async), or wrapping it in unawaited(...) from dart:async if it’s intentionally fire-and-forget.
For https://github.com/getlantern/engineering/issues/2983