mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-12-04 13:20:39 +00:00
Compare commits
4 commits
d0eef16e93
...
bed5c11d3e
Author | SHA1 | Date | |
---|---|---|---|
|
bed5c11d3e | ||
|
4b8e5c2659 | ||
|
1f30c74d18 | ||
|
143aca1053 |
7 changed files with 27 additions and 24 deletions
6
.github/scripts/run_integration_tests.sh
vendored
6
.github/scripts/run_integration_tests.sh
vendored
|
@ -1,6 +0,0 @@
|
|||
flutter drive \
|
||||
--target=integration_test/e2e_test.dart \
|
||||
--driver=test_driver/integration_driver.dart \
|
||||
--flavor=dev \
|
||||
--no-dds \
|
||||
--dart-define cameraStubImage=assets/camera_stub_image.jpg
|
7
.github/workflows/pr_check.yml
vendored
7
.github/workflows/pr_check.yml
vendored
|
@ -6,7 +6,6 @@
|
|||
name: PR check
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
|
@ -62,8 +61,4 @@ jobs:
|
|||
run: |
|
||||
bash ./.github/scripts/stub_iap.sh
|
||||
flutter pub get
|
||||
flutter analyze lib --fatal-infos
|
||||
|
||||
run-integration-tests:
|
||||
uses: ./.github/workflows/run_integration_tests.yml
|
||||
secrets: inherit
|
||||
flutter analyze lib --fatal-infos
|
4
.github/workflows/run_integration_tests.yml
vendored
4
.github/workflows/run_integration_tests.yml
vendored
|
@ -26,8 +26,8 @@ jobs:
|
|||
- name: Restore secrets
|
||||
run: |
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.CONSTANTS }}" "lib/constants.dart"
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_ANDROID }}" "android/app/google-services.json"
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_IOS }}" "ios/Runner/GoogleService-Info.plist"
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_APP_ID_FILE }}" "ios/firebase_app_id_file.json"
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
|||
- name: Run tests
|
||||
run: |
|
||||
flutter drive \
|
||||
--target=integration_test/e2e_test.dart \
|
||||
--target=integration_test/run_all_tests.dart \
|
||||
--driver=test_driver/integration_driver.dart \
|
||||
--flavor=dev \
|
||||
--no-dds \
|
||||
|
|
18
integration_test/README.md
Normal file
18
integration_test/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# M3 Lightmeter integration tests
|
||||
|
||||
### List of executed tests:
|
||||
|
||||
- [Purchases test](integration_test/purchases_test.dart)
|
||||
- [Metering screen layout test](integration_test/metering_screen_layout_test.dart)
|
||||
- [e2e](integration_test/e2e_test.dart)
|
||||
|
||||
### Run all tests
|
||||
|
||||
```console
|
||||
flutter drive \
|
||||
--target=integration_test/run_all_tests.dart \
|
||||
--driver=test_driver/integration_driver.dart \
|
||||
--flavor=dev \
|
||||
--no-dds \
|
||||
--dart-define cameraStubImage=assets/camera_stub_image.jpg
|
||||
```
|
|
@ -2,7 +2,6 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
import 'package:lightmeter/data/models/ev_source_type.dart';
|
||||
import 'package:lightmeter/data/models/metering_screen_layout_config.dart';
|
||||
import 'package:lightmeter/data/shared_prefs_service.dart';
|
||||
|
@ -18,15 +17,15 @@ import 'package:lightmeter/screens/settings/components/shared/dialog_filter/widg
|
|||
import 'package:lightmeter/screens/settings/components/shared/dialog_range_picker/widget_dialog_picker_range.dart';
|
||||
import 'package:lightmeter/screens/settings/screen_settings.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../integration_test/utils/widget_tester_actions.dart';
|
||||
import 'mocks/paid_features_mock.dart';
|
||||
import 'utils/expectations.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
@isTest
|
||||
void testE2E(String description) {
|
||||
setUp(() {
|
||||
SharedPreferences.setMockInitialValues({
|
||||
/// Metering values
|
||||
|
@ -42,7 +41,7 @@ void main() {
|
|||
});
|
||||
|
||||
testWidgets(
|
||||
'e2e',
|
||||
description,
|
||||
(tester) async {
|
||||
await tester.pumpApplication(equipmentProfiles: [], films: []);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
import 'e2e_test.dart';
|
||||
import 'metering_screen_layout_test.dart';
|
||||
import 'purchases_test.dart';
|
||||
|
||||
|
@ -8,4 +9,5 @@ void main() {
|
|||
|
||||
testPurchases('Purchase & refund premium features');
|
||||
testToggleLayoutFeatures('Toggle metering screen layout features');
|
||||
testE2E('e2e');
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
flutter drive \
|
||||
--target=integration_test/e2e_test.dart \
|
||||
--driver=test_driver/integration_driver.dart \
|
||||
--flavor=dev \
|
||||
--dart-define cameraStubImage=assets/camera_stub_image.jpg
|
Loading…
Reference in a new issue