mirror of
https://github.com/block/buzz.git
synced 2026-11-02 23:41:08 +00:00
test(mobile): run the agent card journey in CI through the root wiring
The journey returned early (and passed) without BUZZ_AUTH_DOMAINS, which the main test lane doesn't set, and re-declared the root scope's agent creation handler. It now skips visibly in non-Builderlab runs, runs in the configured-authentication-domains CI step, and takes its overrides from buildRootProviderScope, so removing the production handler fails it. Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz> Signed-off-by: Tom Brow <tomb@squareup.com>
This commit is contained in:
1
.github/workflows/_ci-clients.yml
vendored
1
.github/workflows/_ci-clients.yml
vendored
@@ -144,6 +144,7 @@ jobs:
|
||||
--dart-define=BUZZ_PUSH_GATEWAY_URL=https://push.example
|
||||
--dart-define=BUZZ_AUTH_DOMAINS=buzz.xyz,builderlab.xyz,builderlabstaging.xyz
|
||||
test/shared/auth/community_entry_requirements_test.dart
|
||||
test/features/agents/agent_creation_link_journey_test.dart
|
||||
test/features/invites/invite_join_provider_test.dart
|
||||
test/features/onboarding/onboarding_entry_routes_test.dart
|
||||
test/shared/hosted/hosted_environment_test.dart
|
||||
|
||||
@@ -3,11 +3,12 @@ import 'dart:convert';
|
||||
|
||||
import 'package:buzz/features/agents/agent_creation_draft.dart';
|
||||
import 'package:buzz/features/agents/agents_page.dart';
|
||||
import 'package:buzz/main.dart';
|
||||
import 'package:buzz/shared/hosted/hosted_environment.dart';
|
||||
import 'package:buzz/features/agents/create_agent_page.dart';
|
||||
import 'package:buzz/features/channels/channel.dart';
|
||||
import 'package:buzz/features/channels/channels_provider.dart';
|
||||
import 'package:buzz/features/channels/deep_link_dispatcher.dart';
|
||||
import 'package:buzz/shared/agents/agents_surface.dart';
|
||||
import 'package:buzz/shared/agents/remote_agents.dart';
|
||||
import 'package:buzz/shared/deeplink/pending_deep_link_provider.dart';
|
||||
import 'package:buzz/shared/widgets/preset_agent_avatar.dart';
|
||||
@@ -15,6 +16,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:http/testing.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'agents_harness.dart';
|
||||
|
||||
@@ -74,7 +76,7 @@ void main() {
|
||||
'a buzz://agent/new?card= link opens an editable draft, never creates',
|
||||
(tester) async {
|
||||
final h = await AgentsHarness.create();
|
||||
if (!supportsRemoteAgents(h.community)) return;
|
||||
expect(supportsRemoteAgents(h.community), isTrue);
|
||||
final links = StreamController<Uri>();
|
||||
PendingDeepLinkNotifier.debugUriStreamOverride = links.stream;
|
||||
addTearDown(() async {
|
||||
@@ -88,11 +90,11 @@ void main() {
|
||||
overrides: [
|
||||
channelsProvider.overrideWith(_NoChannels.new),
|
||||
agentCardClientProvider.overrideWithValue(_cdnClient),
|
||||
// Same wiring as buildRootProviderScope.
|
||||
agentCreationSurfaceProvider.overrideWithValue(
|
||||
(context, link) async =>
|
||||
unawaited(showAgents(context, draft: link)),
|
||||
),
|
||||
// The production root wiring from link dispatch to showAgents.
|
||||
...buildRootProviderScope(
|
||||
prefs: await SharedPreferences.getInstance(),
|
||||
child: const SizedBox(),
|
||||
).overrides,
|
||||
],
|
||||
home: const DeepLinkDispatcher(child: Scaffold(body: SizedBox())),
|
||||
);
|
||||
@@ -213,5 +215,8 @@ void main() {
|
||||
await receive(_link('av_fourth'));
|
||||
expect(find.byType(AgentsPage, skipOffstage: false), findsOneWidget);
|
||||
},
|
||||
// Remote agents exist only in Builderlab builds; CI runs this file in its
|
||||
// configured-authentication-domains step.
|
||||
skip: !HostedEnvironment.enabled,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user