Stabilize app shell surface test

This commit is contained in:
Haitao Pan 2026-04-28 11:56:48 +08:00
parent 05d3f43a39
commit a3f205c7d0

View File

@ -49,15 +49,24 @@ void main() {
home: AppShell(controller: controller),
),
);
await tester.pumpAndSettle();
await tester.pump();
expect(find.byKey(const Key('assistant-conversation-shell')), findsOneWidget);
expect(find.byKey(const Key('settings-account-panel-card')), findsNothing);
expect(
find.byKey(const Key('assistant-conversation-shell')),
findsOneWidget,
);
expect(
find.byKey(const Key('settings-account-panel-card')),
findsNothing,
);
controller.openSettings();
await tester.pumpAndSettle();
await tester.pump();
expect(find.byKey(const Key('settings-account-panel-card')), findsOneWidget);
expect(
find.byKey(const Key('settings-account-panel-card')),
findsOneWidget,
);
});
});
}