fix: automate graduate timetable read and refine blue glass Dock
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user