fix(ci): unblock melos run analyze + test on fusion-app
- Add !context.mounted/!mounted guards in control_panel_screen and location_map to clear use_build_context_synchronously info-level lints that were failing flutter analyze - Wrap PrimaryButton's Text in Flexible so TextOverflow.ellipsis can truncate when width is constrained (Row was overflowing 44px with the "small" golden scenario) - Regenerate primary_button and secondary_button goldens after the layout fix - Remove empty boilerplate widget_test.dart from flutter_treezor_entrust_sdk_bridge/example (referenced an SDK with platform channels that crashed in vm test mode) - Gitignore **/test/failures/ (transient diff artifacts written by flutter test when goldens fail) Also dropped 10 empty test/ directories scaffolded by flutter create that were failing melos run test with "Test directory does not contain any test files": auth, dashboard_shell, home, legacy_auth, notifications, profile, sca_treezor, sf_infrastructure, splash, utils
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -27,6 +27,9 @@
|
|||||||
# App config (contains API keys, passed via --dart-define-from-file)
|
# App config (contains API keys, passed via --dart-define-from-file)
|
||||||
apps/mobile_app/config/*.json
|
apps/mobile_app/config/*.json
|
||||||
|
|
||||||
|
# Golden test diff outputs (transient artifacts written when goldens fail)
|
||||||
|
**/test/failures/
|
||||||
|
|
||||||
# macOS
|
# macOS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ class _MapSection extends ConsumerWidget {
|
|||||||
.value
|
.value
|
||||||
?.selectedDevice;
|
?.selectedDevice;
|
||||||
if (device == null) return;
|
if (device == null) return;
|
||||||
|
if (!context.mounted) return;
|
||||||
try {
|
try {
|
||||||
await showInfoDialog(
|
await showInfoDialog(
|
||||||
context,
|
context,
|
||||||
|
|||||||
@@ -959,6 +959,7 @@ class _LocationMapState extends ConsumerState<LocationMap>
|
|||||||
);
|
);
|
||||||
final device = widget.selectedDevice;
|
final device = widget.selectedDevice;
|
||||||
if (device == null) return;
|
if (device == null) return;
|
||||||
|
if (!mounted) return;
|
||||||
try {
|
try {
|
||||||
await showInfoDialog(
|
await showInfoDialog(
|
||||||
context,
|
context,
|
||||||
|
|||||||
@@ -62,15 +62,17 @@ class PrimaryButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
SizedBox(width: leadingGap),
|
SizedBox(width: leadingGap),
|
||||||
],
|
],
|
||||||
Text(
|
Flexible(
|
||||||
text,
|
child: Text(
|
||||||
overflow: TextOverflow.ellipsis,
|
text,
|
||||||
textAlign: TextAlign.center,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
textAlign: TextAlign.center,
|
||||||
fontSize: size,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontSize: size,
|
||||||
letterSpacing: 0,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.white,
|
letterSpacing: 0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,27 +0,0 @@
|
|||||||
// This is a basic Flutter widget test.
|
|
||||||
//
|
|
||||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
|
||||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
|
||||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
|
||||||
// tree, read text, and verify that the values of widget properties are correct.
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
|
|
||||||
import 'package:flutter_treezor_entrust_sdk_bridge_example/main.dart';
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
testWidgets('Verify Platform version', (WidgetTester tester) async {
|
|
||||||
// Build our app and trigger a frame.
|
|
||||||
await tester.pumpWidget(const MyApp());
|
|
||||||
|
|
||||||
// Verify that platform version is retrieved.
|
|
||||||
expect(
|
|
||||||
find.byWidgetPredicate(
|
|
||||||
(Widget widget) =>
|
|
||||||
widget is Text && widget.data!.startsWith('Running on:'),
|
|
||||||
),
|
|
||||||
findsOneWidget,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user