Always show the terminal shortcut on the phone Chat page
The shortcut no longer waits for a running shell: on the Chat page it opens the terminal, starting one at its login prompt when none is open, and shows a count when more than one shell runs.
This commit is contained in:
@@ -297,15 +297,17 @@ void main() {
|
||||
) async {
|
||||
await pumpApp(tester, size: const Size(390, 800), onChat: false);
|
||||
final bubble = find.byKey(const Key('terminal-shortcut-bubble'));
|
||||
await tester.tap(find.byTooltip(TerminalToggleButton.label));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.pageBack();
|
||||
await tester.pumpAndSettle();
|
||||
expect(hub.tabs, isNotEmpty);
|
||||
expect(bubble, findsNothing, reason: 'not on Pipelines, Runs or Search');
|
||||
await pumpApp(tester, size: const Size(390, 800));
|
||||
await tester.pumpAndSettle();
|
||||
// Shown on Chat even before any shell runs; tapping opens the terminal.
|
||||
expect(hub.tabs, isEmpty);
|
||||
expect(bubble, findsOneWidget, reason: 'shown on Chat');
|
||||
expect(find.bySemanticsLabel('Open terminal'), findsOneWidget);
|
||||
await tester.tap(bubble);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.widgetWithText(AppBar, 'Terminal'), findsOneWidget);
|
||||
expect(bubble, findsNothing, reason: 'hidden while the page is open');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user