Skip to content

Commit b2973d6

Browse files
committed
Update example test and fix window import
Update launch_at_login example test to use LaunchAtLoginExampleApp (replace MyApp) and adjust expectations to assert app-specific UI instead of counter behavior; remove unused Material import. In multiple_window_example, hide WindowManager when importing package:flutter/src/widgets/_window.dart to avoid a symbol/name conflict with nativeapi.
1 parent 4d77542 commit b2973d6

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

examples/launch_at_login_example/test/widget_test.dart

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,18 @@
55
// gestures. You can also use WidgetTester to find child widgets in the widget
66
// tree, read text, and verify that the values of widget properties are correct.
77

8-
import 'package:flutter/material.dart';
98
import 'package:flutter_test/flutter_test.dart';
109

1110
import 'package:launch_at_login_example/main.dart';
1211

1312
void main() {
1413
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1514
// Build our app and trigger a frame.
16-
await tester.pumpWidget(const MyApp());
15+
await tester.pumpWidget(const LaunchAtLoginExampleApp());
1716

18-
// Verify that our counter starts at 0.
19-
expect(find.text('0'), findsOneWidget);
20-
expect(find.text('1'), findsNothing);
21-
22-
// Tap the '+' icon and trigger a frame.
23-
await tester.tap(find.byIcon(Icons.add));
24-
await tester.pump();
25-
26-
// Verify that our counter has incremented.
27-
expect(find.text('0'), findsNothing);
28-
expect(find.text('1'), findsOneWidget);
17+
// Verify that the app renders and shows the expected content.
18+
expect(find.text('LaunchAtLogin Example'), findsOneWidget);
19+
expect(find.text('Status'), findsOneWidget);
20+
expect(find.text('Supported'), findsOneWidget);
2921
});
3022
}

examples/multiple_window_example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ignore_for_file: invalid_use_of_internal_member, implementation_imports
22

33
import 'package:flutter/material.dart';
4-
import 'package:flutter/src/widgets/_window.dart';
4+
import 'package:flutter/src/widgets/_window.dart' hide WindowManager;
55
import 'package:nativeapi/nativeapi.dart';
66

77
void main() {

0 commit comments

Comments
 (0)