Rebrand as TPSchedule and refine clear liquid glass dock
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:hepan_everyday/app/tp_startup.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'startup shows brand while initializing and immediately proceeds when ready',
|
||||
(tester) async {
|
||||
final ready = Completer<void>();
|
||||
await tester.pumpWidget(
|
||||
TpStartup(
|
||||
ready: ready.future,
|
||||
child: const MaterialApp(home: Scaffold(body: Text('已准备好课表'))),
|
||||
),
|
||||
);
|
||||
await tester.pump();
|
||||
expect(find.text('TPSchedule'), findsOneWidget);
|
||||
expect(find.text('已准备好课表'), findsNothing);
|
||||
ready.complete();
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(find.text('已准备好课表'), findsOneWidget);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('TPSchedule'), findsNothing);
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user