Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/tizen_window_manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Add 4 integration test cases.

Copy link
Copy Markdown
Member

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.


## 0.1.0

* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,35 @@ void main() {

expect(WidgetsBinding.instance.lifecycleState, AppLifecycleState.resumed);
});

group('WindowManager.getGeometry', () {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates the Can get window geometry info test. Please integrate or remove the tests.

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));
});
});
Comment thread
seungsoo47 marked this conversation as resolved.

group('WindowManager.lower', () {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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);
});
});
}
Loading