33 lines
976 B
Dart
33 lines
976 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:yumi/modules/room_game/views/baishun_loading_view.dart';
|
|
|
|
void main() {
|
|
testWidgets('room game loading overlay can be placed inside stack', (
|
|
WidgetTester tester,
|
|
) async {
|
|
await tester.pumpWidget(
|
|
ScreenUtilInit(
|
|
designSize: const Size(375, 812),
|
|
builder:
|
|
(_, __) => const MaterialApp(
|
|
home: Scaffold(
|
|
body: Stack(
|
|
children: [
|
|
ColoredBox(color: Colors.black),
|
|
Positioned.fill(
|
|
child: IgnorePointer(child: BaishunLoadingView()),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|
|
expect(tester.takeException(), isNull);
|
|
expect(find.byType(BaishunLoadingView), findsOneWidget);
|
|
});
|
|
}
|