mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 15:26:17 +00:00
feat(app): mouse back/forward buttons walk the tab history
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
141e1a20d0
commit
a8559fd467
3 files changed
+104
-67
No files matched your search
@@ -177,6 +177,26 @@ void main() {
|
||||
expect(app.route, isA<JournalsRoute>());
|
||||
});
|
||||
|
||||
testWidgets('mouse back/forward buttons walk the history', (tester) async {
|
||||
final app = await pump(tester, demo());
|
||||
app.go(const AllPagesRoute());
|
||||
await settle(tester);
|
||||
Future<void> press(int button) async {
|
||||
final mouse = await tester.createGesture(
|
||||
kind: PointerDeviceKind.mouse,
|
||||
buttons: button,
|
||||
);
|
||||
await mouse.down(const Offset(800, 500));
|
||||
await mouse.up();
|
||||
await settle(tester);
|
||||
}
|
||||
|
||||
await press(kBackMouseButton);
|
||||
expect(app.route, isA<JournalsRoute>());
|
||||
await press(kForwardMouseButton);
|
||||
expect(app.route, isA<AllPagesRoute>());
|
||||
});
|
||||
|
||||
testWidgets('strip shows titles; middle-click closes, plus opens', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in new issue
Block a user