Commit 39dde2f
Changed files (7)
.github
workflows
app
.github/workflows/app-CI.yml
@@ -67,3 +67,6 @@ jobs:
- name: Run tests
run: flutter test
working-directory: app
+ - name: Run golden tests
+ run: flutter test --tags gold --run-skipped
+ working-directory: app
.github/workflows/pr.yml
@@ -66,7 +66,7 @@ jobs:
working-directory: app
- name: Update goldens
id: gold-upd
- run: flutter test --update-goldens --fail-fast --name="\[gold\].*"
+ run: flutter test --update-goldens --fail-fast --tags gold --run-skipped
working-directory: app
- name: Push golden changes
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-of-failure-with-conditions
app/lib/components/disabled.dart
@@ -1,37 +0,0 @@
-
-import 'package:flutter/material.dart';
-
-/// A widget that visually indicates that it's subtree is disabled and blocks
-/// all interaction with it.
-class Disabled extends StatelessWidget {
- /// Create a widget that visually indicates that it's subtree is disabled
- /// and blocks interaction with it.
- ///
- /// If [disabled] is true the [child]s opacity gets reduced and interaction
- /// gets disabled. This widget has no effect when [disabled] is false.
- const Disabled({required this.child, this.disabled = true, this.ignoring = true, super.key});
-
- /// The widget to render as disabled.
- final Widget child;
-
- /// Whether this widget has an effect.
- final bool disabled;
-
- /// Whether interaction is blocked.
- final bool ignoring;
-
- @override
- Widget build(BuildContext context) {
- if (disabled) {
- return Opacity(
- opacity: 0.7,
- child: IgnorePointer(
- ignoring: ignoring,
- child: child,
- ),
- );
- }
- return child;
- }
-
-}
app/lib/features/settings/export_import_screen.dart
@@ -1,6 +1,5 @@
import 'dart:io';
-import 'package:blood_pressure_app/components/disabled.dart';
import 'package:blood_pressure_app/features/data_picker/interval_picker.dart';
import 'package:blood_pressure_app/features/export_import/active_field_customization.dart';
import 'package:blood_pressure_app/features/export_import/export_button.dart';
@@ -44,10 +43,8 @@ class ExportImportScreen extends StatelessWidget {
const SizedBox(
height: 15,
),
- Disabled(
- disabled: settings.exportFormat == ExportFormat.db,
- child: const IntervalPicker(type: IntervalStoreManagerLocation.exportPage,),
- ),
+ if (settings.exportFormat != ExportFormat.db)
+ const IntervalPicker(type: IntervalStoreManagerLocation.exportPage),
if (Platform.isAndroid) // only supported on android
ListTile(
title: Text(localizations.exportDir),
app/dart_test.yaml
@@ -0,0 +1,3 @@
+tags:
+ gold:
+ skip: "Only run on CI"
\ No newline at end of file
app/pubspec.lock
@@ -671,10 +671,10 @@ packages:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
mime:
dependency: transitive
description:
@@ -1172,26 +1172,26 @@ packages:
dependency: transitive
description:
name: test
- sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb"
+ sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7"
url: "https://pub.dev"
source: hosted
- version: "1.26.2"
+ version: "1.26.3"
test_api:
dependency: transitive
description:
name: test_api
- sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
+ sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
- version: "0.7.6"
+ version: "0.7.7"
test_core:
dependency: transitive
description:
name: test_core
- sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a"
+ sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0"
url: "https://pub.dev"
source: hosted
- version: "0.6.11"
+ version: "0.6.12"
timing:
dependency: transitive
description:
.gitignore
@@ -8,4 +8,7 @@
.idea/
# autogenerated
-*.freezed.dart
\ No newline at end of file
+*.freezed.dart
+
+# Release tool
+target/
\ No newline at end of file