Created
April 4, 2019 03:08
-
-
Save izznfkhrlislm/466ac983a2e8a12c54705481f51d4456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:ScrumBooster/initScreen/AboutPage.dart'; | |
import 'package:ScrumBooster/utils/utils.dart'; | |
void main() { | |
final AboutPage about = AboutPage(); | |
final util = new Util(); | |
//About Page Widget Tests | |
testWidgets('About Page: Find Logos', (WidgetTester tester) async { | |
List<String> keys = <String>[ | |
"Scrum Booster Logo", | |
"Makara UI Logo", | |
]; | |
await tester.pumpWidget(util.makeTestableWidget(child: about)); | |
for (int i = 0; i < keys.length; i++) { | |
expect(find.byKey(new Key(keys[i])), findsOneWidget); | |
} | |
}); | |
testWidgets('About Page: Find Team Members Text', (WidgetTester tester) async { | |
List<String> teamMembers = <String>[ | |
"Mochamad Aulia Akbar Praditomo", | |
"Fajrin Maulana Kingwijati", | |
"Izzan Fakhril Islam", | |
"Muhammad Rezki", | |
"Khoirul Khuluqi Abdulloh", | |
"Wildan Fahmi Gunawan", | |
]; | |
await tester.pumpWidget(util.makeTestableWidget(child: about)); | |
for (int i = 0; i < teamMembers.length; i++) { | |
expect(find.text(teamMembers[i]), findsOneWidget); | |
} | |
}); | |
testWidgets('About Page: Find Explanation words', (WidgetTester tester) async { | |
Key key = new Key("Explanation"); | |
await tester.pumpWidget(util.makeTestableWidget(child: about)); | |
expect(find.byKey(key), findsOneWidget); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment