feat: included test

pull/2/head
alestiago 4 years ago
parent a58de6f475
commit ac740c7a9d

@ -5,15 +5,15 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pinball/app/app.dart';
import 'package:pinball/landing/landing.dart';
void main() {
group('App', () {
testWidgets('renders CounterPage', (tester) async {
testWidgets('renders LandingPage', (tester) async {
await tester.pumpWidget(const App());
expect(find.byType(Container), findsOneWidget);
expect(find.byType(LandingPage), findsOneWidget);
});
});
}

@ -0,0 +1,14 @@
import 'package:flame/game.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pinball/game/game.dart';
import '../../helpers/helpers.dart';
void main() {
group('PinballGamePage', () {
testWidgets('renders single GameWidget with PinballGame', (tester) async {
await tester.pumpApp(const PinballGamePage());
expect(find.byType(GameWidget<PinballGame>), findsOneWidget);
});
});
}

@ -0,0 +1,17 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pinball/game/game.dart';
import 'package:pinball/landing/landing.dart';
import '../../helpers/helpers.dart';
void main() {
group('LandingPage', () {
testWidgets('renders TextButton', (tester) async {
await tester.pumpApp(const LandingPage());
expect(find.byType(TextButton), findsOneWidget);
});
});
}
Loading…
Cancel
Save