fix: automate graduate timetable read and refine blue glass Dock

This commit is contained in:
Codex
2026-10-13 17:50:04 +08:00
parent 8f20a341c4
commit 476ef097ee
23 changed files with 1072 additions and 176 deletions
+20
View File
@@ -2,6 +2,26 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:hepan_everyday/features/school/school_login_flow.dart';
void main() {
test(
'repeated school login bounces have a bounded automatic redirect budget',
() {
final flow = SchoolLoginFlow();
final target = Uri.parse(
'https://yjsjy.uestc.edu.cn/pyxx/pygl/xskbcx/index/1',
);
final login = Uri.parse('https://idas.uestc.edu.cn/authserver/login');
final home = Uri.parse('https://yjsjy.uestc.edu.cn/pyxx/home/index');
flow.begin(target);
for (var i = 0; i < 2; i++) {
flow.onLoaded(login, authenticated: false);
expect(flow.onLoaded(home, authenticated: true), target);
}
flow.onLoaded(login, authenticated: false);
expect(flow.onLoaded(home, authenticated: true), isNull);
flow.begin(target);
expect(flow.onLoaded(home, authenticated: true), target);
},
);
test('wait for student authentication then request timetable once', () {
final flow = SchoolLoginFlow();
final target = Uri.parse(