48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
import 'package:ariadne_client/app.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
testWidgets('renders the Ariadne overview scaffold', (
|
|
WidgetTester tester,
|
|
) async {
|
|
await tester.pumpWidget(const AriadneApp());
|
|
|
|
expect(find.text('ARIADNE'), findsOneWidget);
|
|
expect(find.text('오류 흐름 개요'), findsOneWidget);
|
|
expect(find.text('첫 프로젝트를 연결하세요'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('renders without overflow on a narrow screen', (
|
|
WidgetTester tester,
|
|
) async {
|
|
tester.view.physicalSize = const Size(320, 640);
|
|
tester.view.devicePixelRatio = 1;
|
|
addTearDown(tester.view.resetPhysicalSize);
|
|
addTearDown(tester.view.resetDevicePixelRatio);
|
|
|
|
await tester.pumpWidget(const AriadneApp());
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(tester.takeException(), isNull);
|
|
expect(find.byTooltip('탐색 메뉴 열기'), findsOneWidget);
|
|
expect(find.text('조직 선택'), findsNothing);
|
|
});
|
|
|
|
testWidgets('renders without overflow with enlarged text', (
|
|
WidgetTester tester,
|
|
) async {
|
|
tester.view.physicalSize = const Size(600, 800);
|
|
tester.view.devicePixelRatio = 1;
|
|
tester.platformDispatcher.textScaleFactorTestValue = 2;
|
|
addTearDown(tester.view.resetPhysicalSize);
|
|
addTearDown(tester.view.resetDevicePixelRatio);
|
|
addTearDown(tester.platformDispatcher.clearTextScaleFactorTestValue);
|
|
|
|
await tester.pumpWidget(const AriadneApp());
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(tester.takeException(), isNull);
|
|
expect(find.text('오류 흐름 개요'), findsOneWidget);
|
|
});
|
|
}
|