-
Notifications
You must be signed in to change notification settings - Fork 52
[tizen_window_manager] Add regression integration tests #1053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ## NEXT | ||
|
|
||
| * Add 4 integration test cases. | ||
|
|
||
| ## 0.1.0 | ||
|
|
||
| * Initial release. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,4 +29,35 @@ void main() { | |
|
|
||
| expect(WidgetsBinding.instance.lifecycleState, AppLifecycleState.resumed); | ||
| }); | ||
|
|
||
| group('WindowManager.getGeometry', () { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This duplicates the |
||
| testWidgets('returns a map with all required keys', | ||
| (WidgetTester tester) async { | ||
| final Map<String, int> geometry = await WindowManager.getGeometry(); | ||
| expect(geometry.containsKey('x'), isTrue); | ||
| expect(geometry.containsKey('y'), isTrue); | ||
| expect(geometry.containsKey('width'), isTrue); | ||
| expect(geometry.containsKey('height'), isTrue); | ||
| }); | ||
|
|
||
| testWidgets('returns positive dimensions', (WidgetTester tester) async { | ||
| final Map<String, int> geometry = await WindowManager.getGeometry(); | ||
| expect(geometry['width'], greaterThan(0)); | ||
| expect(geometry['height'], greaterThan(0)); | ||
| }); | ||
| }); | ||
|
seungsoo47 marked this conversation as resolved.
|
||
|
|
||
| group('WindowManager.lower', () { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This duplicates the `Control lower/activate window' test. Please integrate or remove the tests. |
||
| testWidgets('completes without error and window can be reactivated', | ||
| (WidgetTester tester) async { | ||
| await expectLater(WindowManager.lower(), completes); | ||
| await Future<void>.delayed(const Duration(seconds: 1)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1 second looks a bit tight. I recommend at least 2 to 3 seconds. |
||
|
|
||
| // Restore the window so subsequent tests run in a normal state. | ||
| await WindowManager.activate(); | ||
| await Future<void>.delayed(const Duration(seconds: 2)); | ||
|
|
||
| expect(WidgetsBinding.instance.lifecycleState, AppLifecycleState.resumed); | ||
| }); | ||
| }); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are actually 3 testWidgets added.