fix: harden school imports and add optional feedback diagnostics
This commit is contained in:
@@ -109,4 +109,24 @@ void main() {
|
||||
'{"schemaVersion":1,"courses":[${const JsonEncoder().convert(old)}]}';
|
||||
expect(() => JsonScheduleImport.parse(json), throwsFormatException);
|
||||
});
|
||||
test('graduate timetable changes preserve independently saved undergraduate exams', () async {
|
||||
await controller.initialize();
|
||||
await controller.applyExams(exams());
|
||||
await controller.applyImport(
|
||||
ImportDraft(
|
||||
courses: [course()],
|
||||
explicitlyEmpty: false,
|
||||
source: course().source,
|
||||
parserVersion: 'test',
|
||||
schoolTerm: SchoolTerm(72),
|
||||
),
|
||||
confirmedEmpty: false,
|
||||
);
|
||||
expect(controller.lastError, isNull);
|
||||
expect(
|
||||
controller.snapshot.examSchedule?.school,
|
||||
SupportedSchool.uestcUndergraduate,
|
||||
);
|
||||
expect(controller.snapshot.examSchedule?.termId, '503');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user