Skip to content

Commit

Permalink
Merge pull request #16 from surfstudio/dcm_flutter_test_config
Browse files Browse the repository at this point in the history
feat: DCM: example and readme have been corrected
  • Loading branch information
martynov-alex authored Mar 4, 2024
2 parents 650ea3c + 500ba41 commit bfb1f3e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
/// You can specify your own themes.
/// Stringified is used for naming screenshots.
final themes = [
TestingTheme(
helper.TestingTheme(
data: ThemeData.dark(),
stringified: 'dark',
type: ThemeType.dark,
type: helper.ThemeType.dark,
),
TestingTheme(
helper.TestingTheme(
data: ThemeData.light(),
stringified: 'light',
type: ThemeType.light,
type: helper.ThemeType.light,
),
];
/// You can specify your own devices.
final devices = [
TestDevice(
helper.TestDevice(
name: 'iphone11',
size: const Size(414, 896),
safeArea: const EdgeInsets.only(top: 44, bottom: 34),
),
TestDevice(
helper.TestDevice(
name: 'pixel 4a',
size: const Size(393, 851),
),
TestDevice(
helper.TestDevice(
name: 'iphone_se_1',
size: const Size(640 / 2, 1136 / 2),
),
Expand All @@ -73,7 +73,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
localizations: _localizations,
locales: _locales,
wrapper: (child, mode, theme, localizations, locales) =>
BaseWidgetTestWrapper(
helper.BaseWidgetTestWrapper(
childBuilder: child,
mode: mode,
themeData: theme,
Expand Down
17 changes: 8 additions & 9 deletions example/test/flutter_test_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:surf_widget_test_composer/surf_widget_test_composer.dart'
as helper;
import 'package:surf_widget_test_composer/surf_widget_test_composer.dart';
import 'package:surf_widget_test_composer_example/src/localization/app_localizations.dart';

/// Localization and locales from auto-generated AppLocalizations.
Expand All @@ -14,30 +13,30 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
/// You can specify your own themes.
/// Stringified is used for naming screenshots.
final themes = [
TestingTheme(
helper.TestingTheme(
data: ThemeData.dark(),
stringified: 'dark',
type: ThemeType.dark,
type: helper.ThemeType.dark,
),
TestingTheme(
helper.TestingTheme(
data: ThemeData.light(),
stringified: 'light',
type: ThemeType.light,
type: helper.ThemeType.light,
),
];

/// You can specify your own devices.
final devices = [
TestDevice(
helper.TestDevice(
name: 'iphone11',
size: const Size(414, 896),
safeArea: const EdgeInsets.only(top: 44, bottom: 34),
),
TestDevice(
helper.TestDevice(
name: 'pixel 4a',
size: const Size(393, 851),
),
TestDevice(
helper.TestDevice(
name: 'iphone_se_1',
size: const Size(640 / 2, 1136 / 2),
),
Expand All @@ -49,7 +48,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
localizations: _localizations,
locales: _locales,
wrapper: (child, mode, theme, localizations, locales) =>
BaseWidgetTestWrapper(
helper.BaseWidgetTestWrapper(
childBuilder: child,
mode: mode,
themeData: theme,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: surf_widget_test_composer
description: Utility that simplifies golden testing.
description: A utility created to streamline golden testing procedures.
version: 0.0.1

homepage: https://github.com/surfstudio/flutter-surf-widget-test-composer
Expand Down

0 comments on commit bfb1f3e

Please sign in to comment.