mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 10:52:34 +01:00
Merge branch 'krille/integration-tests' into 'main'
chore: Add initial integration tests See merge request famedly/fluffychat!833
This commit is contained in:
commit
28aa55057b
@ -1,6 +1,7 @@
|
||||
image:
|
||||
name: cirrusci/flutter:2.10.1
|
||||
variables:
|
||||
FLUTTER_VERSION: 2.10.4
|
||||
|
||||
image: cirrusci/flutter:${FLUTTER_VERSION}
|
||||
|
||||
.shared_windows_runners:
|
||||
tags:
|
||||
@ -30,6 +31,22 @@ test:
|
||||
stage: coverage
|
||||
script: [flutter test]
|
||||
|
||||
integration_test:
|
||||
image: registry.gitlab.com/famedly/company/frontend/flutter-dockerimages/integration/stable:${FLUTTER_VERSION}
|
||||
stage: coverage
|
||||
before_script:
|
||||
- chmod 777 -R /dev/kvm
|
||||
- adb start-server
|
||||
- emulator -avd test -no-audio -no-boot-anim -no-window -accel on -gpu swiftshader_indirect &
|
||||
- sleep 10
|
||||
script:
|
||||
- flutter pub get
|
||||
- flutter test integration_test
|
||||
tags:
|
||||
- famedly
|
||||
- docker
|
||||
timeout: 20m
|
||||
|
||||
build_web:
|
||||
stage: coverage
|
||||
before_script:
|
||||
|
19
integration_test/app_test.dart
Normal file
19
integration_test/app_test.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:fluffychat/pages/homeserver_picker/homeserver_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
import 'package:fluffychat/main.dart' as app;
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
group('Integration Test', () {
|
||||
testWidgets('Test if the app starts', (WidgetTester tester) async {
|
||||
app.main();
|
||||
await tester.pumpAndSettle();
|
||||
find.byWidgetPredicate((widget) => Widget is HomeserverPicker);
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
});
|
||||
}
|
31
pubspec.lock
31
pubspec.lock
@ -56,7 +56,7 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.0"
|
||||
version: "3.1.6"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -505,6 +505,11 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.0"
|
||||
flutter_driver:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_highlight:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -716,6 +721,11 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
fuchsia_remote_debug_protocol:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
future_loading_dialog:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -877,6 +887,11 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.6.0"
|
||||
integration_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -1621,6 +1636,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
sync_http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sync_http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -1957,6 +1979,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
webdriver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webdriver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -95,6 +95,8 @@ dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
import_sorter: ^4.6.0
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
|
||||
flutter_native_splash:
|
||||
color: "#ffffff"
|
||||
|
Loading…
Reference in New Issue
Block a user