From 17287f91a4344c9c2abb2f6dd4db8c97bd3b48c2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 14 Jun 2024 21:13:38 +0800 Subject: [PATCH] increase tolerance of dialog golden tests --- .../src/widgets/{ => dialog}/dialog_golden_test.dart | 4 ++++ forui/test/src/widgets/dialog/flutter_test_config.dart | 10 ++++++++++ 2 files changed, 14 insertions(+) rename forui/test/src/widgets/{ => dialog}/dialog_golden_test.dart (91%) create mode 100644 forui/test/src/widgets/dialog/flutter_test_config.dart diff --git a/forui/test/src/widgets/dialog_golden_test.dart b/forui/test/src/widgets/dialog/dialog_golden_test.dart similarity index 91% rename from forui/test/src/widgets/dialog_golden_test.dart rename to forui/test/src/widgets/dialog/dialog_golden_test.dart index 46c022498..cb839ca70 100644 --- a/forui/test/src/widgets/dialog_golden_test.dart +++ b/forui/test/src/widgets/dialog/dialog_golden_test.dart @@ -1,10 +1,14 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +<<<<<<< HEAD:forui/test/src/widgets/dialog_golden_test.dart import 'package:flutter_test/flutter_test.dart'; import 'package:forui/forui.dart'; import '../test_scaffold.dart'; +======= +import '../../test_scaffold.dart'; +>>>>>>> 3323baa (increase tolerance of dialog golden tests):forui/test/src/widgets/dialog/dialog_golden_test.dart class UnderTest extends StatelessWidget { final FDialogAlignment alignment; diff --git a/forui/test/src/widgets/dialog/flutter_test_config.dart b/forui/test/src/widgets/dialog/flutter_test_config.dart new file mode 100644 index 000000000..bb7b09d25 --- /dev/null +++ b/forui/test/src/widgets/dialog/flutter_test_config.dart @@ -0,0 +1,10 @@ +import 'dart:async'; + +import '../../flutter_test_config.dart'; + +const _kGoldenTestsThreshold = 1.5 / 100; + +Future testExecutable(FutureOr Function() testMain) async { + await configureGoldenTests(_kGoldenTestsThreshold); + await testMain(); +}