app scaffold
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// example 的 smoke test:只验证壳能起来。
|
||||
//
|
||||
// 真正的扫码行为依赖原生实现,单测里跑不了;原生接通后请写
|
||||
// integration_test 而不是在这里 mock。
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:native_scan_example/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('渲染出扫码入口', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const ExampleApp());
|
||||
|
||||
expect(find.text('未扫码'), findsOneWidget);
|
||||
expect(find.byWidgetPredicate((Widget w) => w is FilledButton), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user