-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from natsuk4ze/Update-CI
Update CI
- Loading branch information
Showing
5 changed files
with
154 additions
and
11 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'dart:io' show Platform; | ||
|
||
import 'package:compassx_example/main.dart'; | ||
import 'package:device_info_plus/device_info_plus.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
testWidgets('Test', (tester) async { | ||
await tester.pumpWidget(const App()); | ||
|
||
/// Wait while data is being acquired and the | ||
/// [CircularProgressIndicator] is displayed. | ||
await tester.pumpAndSettle(); | ||
|
||
/// Ensure that the Android SDK 23 and lower emulators and the iOS | ||
/// simulator do not have a heading sensor, so that an Exception is Throw. | ||
final hasSensor = Platform.isAndroid && | ||
(await DeviceInfoPlugin().androidInfo).version.sdkInt > 23; | ||
hasSensor | ||
? expect(find.textContaining('Heading'), findsOneWidget) | ||
: expect(find.textContaining('CompassXException'), findsOneWidget); | ||
}); | ||
} |
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
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
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