You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from version 0.3.3 to 0.5.0 the golden test stopped showing dialogs and opened dropdown menus. I have changed nothing with the pre test pumps, but still
// flutter_test_config.dart
import 'dart:async';
import 'dart:io';
import 'package:alchemist/alchemist.dart';
import 'package:flutter/material.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
// This is used to detect if it is running in a github actions workflow
// For other CI Systems this might look different
final isRunningInCi = Platform.environment['CI'] == 'true';
return AlchemistConfig.runWithConfig(
config: AlchemistConfig(
theme: baseTheme.copyWith(textTheme: strippedTextTheme),
platformGoldensConfig: PlatformGoldensConfig(
enabled: !isRunningInCi,
),
),
run: testMain,
);
}
final baseTheme = ThemeData.light();
final baseTextTheme = baseTheme.textTheme;
final strippedTextTheme = baseTextTheme.copyWith(
displayLarge: baseTextTheme.displayLarge?.forGoldens,
displayMedium: baseTextTheme.displayMedium?.forGoldens,
displaySmall: baseTextTheme.displaySmall?.forGoldens,
headlineLarge: baseTextTheme.headlineLarge?.forGoldens,
headlineMedium: baseTextTheme.headlineMedium?.forGoldens,
headlineSmall: baseTextTheme.headlineSmall?.forGoldens,
bodyLarge: baseTextTheme.bodyLarge?.forGoldens,
bodyMedium: baseTextTheme.bodyMedium?.forGoldens,
bodySmall: baseTextTheme.bodySmall?.forGoldens,
titleLarge: baseTextTheme.titleLarge?.forGoldens,
titleMedium: baseTextTheme.titleMedium?.forGoldens,
titleSmall: baseTextTheme.titleSmall?.forGoldens,
labelLarge: baseTextTheme.labelLarge?.forGoldens,
labelMedium: baseTextTheme.labelMedium?.forGoldens,
labelSmall: baseTextTheme.labelSmall?.forGoldens,
);
extension _GoldenTextStyle on TextStyle {
TextStyle get forGoldens {
final familySplit = fontFamily?.split('/');
final rawFamily = familySplit?.last;
return TextStyle(
inherit: inherit,
color: color,
backgroundColor: backgroundColor,
fontSize: fontSize,
fontWeight: fontWeight,
fontStyle: fontStyle,
letterSpacing: letterSpacing,
wordSpacing: wordSpacing,
textBaseline: textBaseline,
height: height,
locale: locale,
foreground: foreground,
background: background,
shadows: shadows,
fontFeatures: fontFeatures,
decoration: decoration,
decorationColor: decorationColor,
decorationStyle: decorationStyle,
decorationThickness: decorationThickness,
debugLabel: debugLabel,
package: null,
fontFamily: rawFamily,
fontFamilyFallback: const ['Roboto'],
);
}
}
And these are the resulting images (for the ci):
Expected behavior
The dropdown menu and dialog should be visable like in these screenshots generated with the 0.3.3 version (sadly due to the The non-abstract class 'BlockedTextCanvasAdapter' is missing implementations for these members error I can't produce these with the provided code, so I took the screenshot from our app):
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Version
0.5.0
Description
After upgrading from version 0.3.3 to 0.5.0 the golden test stopped showing dialogs and opened dropdown menus. I have changed nothing with the pre test pumps, but still
Steps to reproduce
This is a test I wrote, trying to reproduce it:
This is the config setup:
And these are the resulting images (for the ci):
Expected behavior
The dropdown menu and dialog should be visable like in these screenshots generated with the 0.3.3 version (sadly due to the
The non-abstract class 'BlockedTextCanvasAdapter' is missing implementations for these members
error I can't produce these with the provided code, so I took the screenshot from our app):Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: