Revert "Add tests with golden files"

This reverts commit a7b67631df.
This commit is contained in:
Roland Geider
2021-04-24 13:47:28 +02:00
parent a7b67631df
commit adb1dec9e6
26 changed files with 0 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -80,8 +80,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsNothing);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_1.png'));
await tester.tap(find.byIcon(Icons.chevron_right));
await tester.pumpAndSettle();
@@ -91,7 +89,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_2.png'));
await tester.drag(find.byType(ExerciseOverview), Offset(-500.0, 0.0));
await tester.pumpAndSettle();
@@ -105,7 +102,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_3.png'));
await tester.drag(find.byType(LogPage), Offset(-500.0, 0.0));
await tester.pumpAndSettle();
@@ -115,7 +111,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_4.png'));
await tester.tap(find.byIcon(Icons.chevron_right));
await tester.pumpAndSettle();
@@ -123,7 +118,6 @@ void main() {
expect(find.text('test exercise 1'), findsOneWidget);
expect(find.byType(LogPage), findsOneWidget);
expect(find.byType(Form), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_5.png'));
await tester.drag(find.byType(LogPage), Offset(-500.0, 0.0));
await tester.pumpAndSettle();
@@ -133,7 +127,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_6.png'));
await tester.tap(find.byIcon(Icons.chevron_right));
await tester.pumpAndSettle();
@@ -144,7 +137,6 @@ void main() {
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.exit_to_app), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsNothing);
await expectLater(find.byType(MaterialApp), matchesGoldenFile('gym_mode_7.png'));
//
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -114,9 +114,4 @@ void main() {
// Detail page
// ...
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen(meal1));
await expectLater(find.byType(MaterialApp), matchesGoldenFile('nutritional_meal_form.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -118,9 +118,4 @@ void main() {
await tester.pumpAndSettle();
expect(find.text(('New cool plan')), findsOneWidget, reason: 'Nutritional plan detail page');
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen(plan1));
await expectLater(find.byType(MaterialApp), matchesGoldenFile('nutritional_plan_form.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -87,9 +87,4 @@ void main() {
expect(find.text('17:00'), findsOneWidget);
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createNutritionalPlan());
await expectLater(find.byType(MaterialApp), matchesGoldenFile('nutritional_plan_screen.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -106,9 +106,4 @@ void main() {
expect(find.text('1.1.2021'), findsOneWidget);
expect(find.text('10.1.2021'), findsOneWidget);
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen());
await expectLater(find.byType(MaterialApp), matchesGoldenFile('nutritional_plans_screen.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -107,9 +107,4 @@ void main() {
expect(find.text('1.1.2021'), findsOneWidget);
expect(find.text('10.1.2021'), findsOneWidget);
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen());
await expectLater(find.byType(MaterialApp), matchesGoldenFile('weight_screen.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -98,9 +98,4 @@ void main() {
expect(find.text('Dienstag'), findsOneWidget);
expect(find.text('Donnerstag'), findsOneWidget);
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen());
await expectLater(find.byType(MaterialApp), matchesGoldenFile('workout_day_form.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -106,10 +106,4 @@ void main() {
await tester.pumpAndSettle();
expect(find.text(('New cool workout')), findsOneWidget, reason: 'Workout plan detail page');
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen(plan2));
await tester.pumpAndSettle();
await expectLater(find.byType(MaterialApp), matchesGoldenFile('workout_form.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -83,12 +83,4 @@ void main() {
expect(find.text('Montag, Dienstag'), findsOneWidget);
expect(find.text('Donnerstag'), findsOneWidget);
});
// flutter test --update-goldens
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen());
await tester.tap(find.byType(TextButton));
await tester.pumpAndSettle();
await expectLater(find.byType(MaterialApp), matchesGoldenFile('workout_plan_screen.png'));
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -108,9 +108,4 @@ void main() {
expect(find.text('1.1.2021'), findsOneWidget);
expect(find.text('12.2.2021'), findsOneWidget);
});
testWidgets('Golden test', (WidgetTester tester) async {
await tester.pumpWidget(createHomeScreen());
await expectLater(find.byType(MaterialApp), matchesGoldenFile('workout_plan_screens.png'));
});
}