Skip to content

Commit

Permalink
Refactor application customization tests to update property names for…
Browse files Browse the repository at this point in the history
… appbarIcon and splashScreenImage
  • Loading branch information
frankmer committed Dec 4, 2024
1 parent 9376f43 commit 83d2d91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/model/extensions/enums/image_file_type_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import 'package:image_picker/image_picker.dart';

import '../../enums/image_file_type.dart';

extension ImageFileTypeX on ImageFormat {
extension ImageFormatX on ImageFormat {
static ImageFormat fromExtensionString(String ex) => switch (ex) {
'svg' => ImageFormat.svg,
'svgz' => ImageFormat.svgz,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ void _testAppCustomizer() {
// Assert
expect(json['appName'], equals('test'));
expect(json['websiteLink'], equals('https://test'));
expect(json['appbarIcon'], equals({'fileType': 'png', 'imageData': base64Encode(defaultIconUint8List), 'fileName': 'appbarIcon'}));
expect(json['splashScreenImage'], equals({'fileType': 'png', 'imageData': base64Encode(defaultImageUint8List), 'fileName': 'splashScreenImage'}));
expect(json['appbarIcon'], equals({'imageFormat': 'png', 'imageData': base64Encode(defaultIconUint8List), 'fileName': 'appbarIcon'}));
expect(json['splashScreenImage'], equals({'imageFormat': 'png', 'imageData': base64Encode(defaultImageUint8List), 'fileName': 'splashScreenImage'}));
expect(json['lightTheme'], equals(ApplicationCustomization.defaultCustomization.lightTheme.toJson()));
expect(json['darkTheme'], equals(ApplicationCustomization.defaultCustomization.darkTheme.toJson()));
expect(json['disabledFeatures'], equals({AppFeature.patchNotes.name}));
Expand Down Expand Up @@ -109,8 +109,8 @@ void _testAppCustomizer() {
final newCustomization = ApplicationCustomization.fromJson({
'appName': 'test2',
'websiteLink': 'https://test2',
'appbarIcon': {'fileType': 'png', 'imageData': base64Encode(defaultIconUint8List), 'fileName': 'appbarIcon'},
'splashScreenImage': {'fileType': 'png', 'imageData': base64Encode(defaultImageUint8List), 'fileName': 'splashScreenImage'},
'appbarIcon': {'imageFormat': 'png', 'imageData': base64Encode(defaultIconUint8List), 'fileName': 'appbarIcon'},
'splashScreenImage': {'imageFormat': 'png', 'imageData': base64Encode(defaultImageUint8List), 'fileName': 'splashScreenImage'},
'lightTheme': ApplicationCustomization.defaultCustomization.lightTheme.toJson(),
'darkTheme': ApplicationCustomization.defaultCustomization.darkTheme.toJson(),
'disabledFeatures': [],
Expand Down

0 comments on commit 83d2d91

Please sign in to comment.