mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-28 23:25:52 +01:00
Rename the Dart package, Android and iOS identifiers, Rust crates, native libraries, and Discord plugin. Preserve legacy data readers and compatibility aliases. Update localized branding, documentation, artwork, build tooling, and release artifacts. Route Telegram release notifications to @mornyeupdates and link @mornyecommunity.
32 lines
990 B
Dart
32 lines
990 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:mornye/services/activity_attachment.dart';
|
|
|
|
void main() {
|
|
testWidgets('startup waits until an Activity reports its lifecycle', (
|
|
tester,
|
|
) async {
|
|
final binding = tester.binding;
|
|
binding.handleAppLifecycleStateChanged(AppLifecycleState.detached);
|
|
var attached = false;
|
|
final waiting = waitForActivityAttachment(
|
|
binding,
|
|
).then((_) => attached = true);
|
|
await tester.pump();
|
|
expect(attached, isFalse);
|
|
|
|
binding.handleAppLifecycleStateChanged(AppLifecycleState.resumed);
|
|
await waiting;
|
|
expect(attached, isTrue);
|
|
});
|
|
|
|
testWidgets('an attached Activity does not delay startup', (tester) async {
|
|
tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.resumed);
|
|
var attached = false;
|
|
await waitForActivityAttachment(
|
|
tester.binding,
|
|
).then((_) => attached = true);
|
|
expect(attached, isTrue);
|
|
});
|
|
}
|