feat(learn): the assistant's conversation a dialog on the desktop and in expanded windows (Todo's ADR 0033, D11)
- halkyon_ui's sheetShowsAsDialog says whether showAdaptiveSheet shows a dialog here, for a sheet of its own that can't go through it. - Learn's conversation, a half-height sheet dragged up, asks it: where sheets are dialogs it is a dialog up to 720 wide and as tall as the window, with no handle to drag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
c83f7c46ff
commit
4898d0a04a
1 changed files with 145 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:halkyon_app/halkyon_app.dart';
|
||||
import 'package:halkyon_app/testing.dart';
|
||||
|
|
@ -265,6 +265,30 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
testWidgets('on the desktop the conversation opens in a dialog, however '
|
||||
"narrow the window, with no handle to drag (Todo's ADR 0033, D11)", (
|
||||
tester,
|
||||
) async {
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.linux;
|
||||
addTearDown(() => debugDefaultTargetPlatformOverride = null);
|
||||
await showApp(tester);
|
||||
assistants.answers.add(_says('Because it joins clauses.'));
|
||||
|
||||
await ask(tester, 'Why て-form?');
|
||||
|
||||
expect(find.byType(Dialog), findsOneWidget);
|
||||
expect(find.byType(BottomSheet), findsNothing);
|
||||
expect(find.byType(DraggableScrollableSheet), findsNothing);
|
||||
expect(
|
||||
find.text('Because it joins clauses.', findRichText: true),
|
||||
findsOneWidget,
|
||||
);
|
||||
await tester.tap(find.byTooltip('Close'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(Dialog), findsNothing);
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
});
|
||||
|
||||
testWidgets('an assistant not agreed to asks for agreement first, sending '
|
||||
'nothing (D40)', (tester) async {
|
||||
assistants.offer = AssistantsOffer(assistants: [_claude(agreed: false)]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue