feat: select school before connecting timetable

This commit is contained in:
Codex
2026-10-14 20:58:47 +08:00
parent ce21cdc10c
commit d83481d965
12 changed files with 297 additions and 20 deletions
+5 -5
View File
@@ -28,16 +28,16 @@ void main() {
await tester.drag(find.text('周三'), const Offset(-250, 0));
await tester.pumpAndSettle();
expect(find.text('第 2 周'), findsOneWidget);
expect(find.text('登录学校账户'), findsNothing);
expect(find.text('选择学校'), findsNothing);
await tester.drag(
find.byKey(const Key('dock-cursor')),
const Offset(185, 0),
);
await tester.pumpAndSettle();
expect(find.text('登录学校账户'), findsOneWidget);
await tester.drag(find.text('连接学校课表'), const Offset(250, 0));
expect(find.text('选择学校'), findsOneWidget);
await tester.drag(find.text('学校课表'), const Offset(250, 0));
await tester.pumpAndSettle();
expect(find.text('登录学校账户'), findsOneWidget);
expect(find.text('选择学校'), findsOneWidget);
await tester.drag(
find.byKey(const Key('dock-cursor')),
const Offset(-185, 0),
@@ -46,7 +46,7 @@ void main() {
expect(find.text('示例课表'), findsOneWidget);
await tester.tap(find.text('我的'));
await tester.pumpAndSettle();
expect(find.text('登录学校账户'), findsOneWidget);
expect(find.text('选择学校'), findsOneWidget);
c.dispose();
});
testWidgets('cancelled cursor drag keeps selected tab', (tester) async {