- Player + VideoController per session; Reload video (Ctrl+R) and a frozen-picture watchdog that reloads automatically. - Shortcuts no longer fire while typing; empty swap disabled; hwdec setting/env actually applied. - Idle unready measured from real inactivity; cancellable reconnects and setup; ready restored from server state; kicked/failed host stops its server; graceful leave on window close; no URLs with keys in display names. - Welcome + connect screens replaced by one Home screen with Join and Host cards, recent servers, Settings, Integrations and About. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1021 B
Dart
34 lines
1021 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:watch_together/src/widgets/text_focus.dart';
|
|
|
|
void main() {
|
|
// Regression: the old FocusNode-parent walk never met EditableText, so
|
|
// session shortcuts (Space, arrows, F) fired while typing in chat.
|
|
testWidgets('text field focus is detected, buttons are not', (tester) async {
|
|
final field = FocusNode();
|
|
final button = FocusNode();
|
|
await tester.pumpWidget(MaterialApp(
|
|
home: Scaffold(
|
|
body: Column(children: [
|
|
TextField(focusNode: field),
|
|
TextButton(focusNode: button, onPressed: () {}, child: const Text('b')),
|
|
]),
|
|
),
|
|
));
|
|
expect(textInputFocused(), isFalse);
|
|
|
|
field.requestFocus();
|
|
await tester.pump();
|
|
expect(field.hasPrimaryFocus, isTrue);
|
|
expect(textInputFocused(), isTrue);
|
|
|
|
button.requestFocus();
|
|
await tester.pump();
|
|
expect(textInputFocused(), isFalse);
|
|
|
|
field.dispose();
|
|
button.dispose();
|
|
});
|
|
}
|