- code import fix
This commit is contained in:
40
desktop-app/test/widget_test.dart
Normal file
40
desktop-app/test/widget_test.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:tt_desktop/features/auth/presentation/login_page.dart';
|
||||
import 'package:tt_desktop/features/shell/presentation/app_shell.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('login presents its native sign-in form', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.pumpWidget(const MaterialApp(home: LoginPage()));
|
||||
|
||||
expect(find.text('Willkommen zurück'), findsOneWidget);
|
||||
expect(find.text('Anmelden'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('workspace switches to the club product', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
await tester.binding.setSurfaceSize(const Size(1280, 900));
|
||||
addTearDown(() => tester.binding.setSurfaceSize(null));
|
||||
await tester.pumpWidget(const MaterialApp(home: AppShell()));
|
||||
|
||||
await tester.tap(find.byTooltip('Produkt wechseln'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('TT Verein').last);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('TT Verein'), findsWidgets);
|
||||
expect(find.text('Kommunikation'), findsWidgets);
|
||||
expect(find.text('Alles Wichtige aus deinem Verein.'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user