Compare commits

..

No commits in common. "bed5c11d3e361ea544dd6a11d6794563701c23d2" and "d0eef16e93c47071f332e1817c4e6730b03e16e7" have entirely different histories.

7 changed files with 24 additions and 27 deletions

View file

@ -0,0 +1,6 @@
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

View file

@ -6,6 +6,7 @@
name: PR check
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
@ -61,4 +62,8 @@ jobs:
run: |
bash ./.github/scripts/stub_iap.sh
flutter pub get
flutter analyze lib --fatal-infos
flutter analyze lib --fatal-infos
run-integration-tests:
uses: ./.github/workflows/run_integration_tests.yml
secrets: inherit

View file

@ -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/run_all_tests.dart \
--target=integration_test/e2e_test.dart \
--driver=test_driver/integration_driver.dart \
--flavor=dev \
--no-dds \

View file

@ -1,18 +0,0 @@
# 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
```

View file

@ -2,6 +2,7 @@ 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';
@ -17,15 +18,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';
@isTest
void testE2E(String description) {
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
setUp(() {
SharedPreferences.setMockInitialValues({
/// Metering values
@ -41,7 +42,7 @@ void testE2E(String description) {
});
testWidgets(
description,
'e2e',
(tester) async {
await tester.pumpApplication(equipmentProfiles: [], films: []);

View file

@ -1,6 +1,5 @@
import 'package:integration_test/integration_test.dart';
import 'e2e_test.dart';
import 'metering_screen_layout_test.dart';
import 'purchases_test.dart';
@ -9,5 +8,4 @@ void main() {
testPurchases('Purchase & refund premium features');
testToggleLayoutFeatures('Toggle metering screen layout features');
testE2E('e2e');
}

View file

@ -0,0 +1,5 @@
flutter drive \
--target=integration_test/e2e_test.dart \
--driver=test_driver/integration_driver.dart \
--flavor=dev \
--dart-define cameraStubImage=assets/camera_stub_image.jpg