Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erluxman committed Jul 24, 2020
1 parent 648184f commit 232cb22
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/features/home/animated_motivation_meter_test.dart

This file was deleted.

23 changes: 23 additions & 0 deletions test/features/home/home_screen_components_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:productive/common/resources/r.dart';
import 'package:productive/features/home/widgets/animated_circle_progress.dart';

void main() {
group("All required widgets are on the Splash screen", () {
setUpAll(() {
R.buildMode.isTesting = true;
});

tearDownAll(() {
R.buildMode.isTesting = false;
});

testWidgets("test animated progressbar", (WidgetTester tester) async {
await tester.pumpWidget(
// ignore: prefer_const_constructors
AnimatedMotivationMeter(height: 200, width: 200, motivation: 0.5));
expect(find.byType(CustomPaint), findsNWidgets(1));
});
});
}

0 comments on commit 232cb22

Please sign in to comment.