Skip to content

Commit

Permalink
chore: integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Apr 10, 2023
1 parent fcb5c8f commit cb916d4
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 11 deletions.
18 changes: 18 additions & 0 deletions integration_test/app_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

import 'package:spotube/main.dart' as app;

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

group('end-to-end test', () {
testWidgets('check if app is successfully starting', (tester) async {
await app.main([]);
await tester.pumpAndSettle();

expect(find.byType(MaterialApp), findsOneWidget);
});
});
}
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import 'package:window_manager/window_manager.dart';
import 'package:window_size/window_size.dart';
import 'package:system_theme/system_theme.dart';

void main(List<String> rawArgs) async {
Future<void> main(List<String> rawArgs) async {
final parser = ArgParser();

parser.addFlag(
Expand Down
51 changes: 41 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb"
url: "https://pub.dev"
source: hosted
version: "3.3.6"
version: "3.3.2"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -615,6 +615,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.2"
flutter_driver:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
flutter_feather_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -745,6 +750,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.2.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
fuzzywuzzy:
dependency: "direct main"
description:
Expand Down Expand Up @@ -857,6 +867,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.0"
integration_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -1185,14 +1200,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.1+1"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
url: "https://pub.dev"
source: hosted
version: "3.6.2"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -1511,6 +1518,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
sync_http:
dependency: transitive
description:
name: sync_http
sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
synchronized:
dependency: transitive
description:
Expand Down Expand Up @@ -1703,6 +1718,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.3.3"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7
url: "https://pub.dev"
source: hosted
version: "9.4.0"
watcher:
dependency: transitive
description:
Expand All @@ -1719,6 +1742,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.0"
webdriver:
dependency: transitive
description:
name: webdriver
sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841
url: "https://pub.dev"
source: hosted
version: "3.0.1"
win32:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ dev_dependencies:
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
hive_generator: ^2.0.0
pub_api_client: ^2.4.0
pubspec_parse: ^1.2.2
Expand Down

0 comments on commit cb916d4

Please sign in to comment.