Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Dec 5, 2023
1 parent 811168b commit 3185dcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
16 changes: 5 additions & 11 deletions packages/convenient_test_dev/lib/src/functions/find.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ extension ExtCommonFinders on CommonFinders {
// hacky beautify things like [LoginMark.username]; only useful when code is not obfuscated
if (name is Enum && name.runtimeType.toString().endsWith('Mark')) {
final cls = name.toString().split('.')[0];
final modifiedCls =
ReCase(cls.substring(0, cls.length - 'Mark'.length)).camelCase;
final modifiedCls = ReCase(cls.substring(0, cls.length - 'Mark'.length)).camelCase;
description = '$modifiedCls#${name.name}';
}

Expand All @@ -111,8 +110,7 @@ extension ExtCommonFinders on CommonFinders {
}
ans = DelegatingFinder(
ans,
overrideDescribeMatch: (plurality) =>
finders.map((f) => f.describeMatch(plurality)).join(' -> '),
overrideDescribeMatch: (plurality) => finders.map((f) => f.describeMatch(plurality)).join(' -> '),
);

return ans;
Expand Down Expand Up @@ -164,8 +162,7 @@ class TFinderCommand extends TCommand {
finder,
text,
logCallback: (oldValue, newValue) {
log.update(
logTitle, '$basicLogMessage (old text: "${oldValue.text}")');
log.update(logTitle, '$basicLogMessage (old text: "${oldValue.text}")');
},
),
preCondition: null,
Expand Down Expand Up @@ -193,8 +190,7 @@ class TFinderCommand extends TCommand {
bool? settle,
}) =>
act(
act: (log) =>
t.tester.tapAt(alignment.withinRect(t.tester.getRect(finder))),
act: (log) => t.tester.tapAt(alignment.withinRect(t.tester.getRect(finder))),
preCondition: warnIfMissed ? ElementHitTestableMatcher(t.tester) : null,
logTitle: 'TAP',
logMessage: finder.describeMatch(Plurality.one),
Expand Down Expand Up @@ -241,9 +237,7 @@ class TFinderCommand extends TCommand {
secondDownOffset: secondDownOffset,
firstFingerOffsets: firstFingerOffsets,
secondFingerOffsets: secondFingerOffsets,
afterMove: (logMove ?? false)
? (i) async => log.snapshot(name: 'move #$i')
: null,
afterMove: (logMove ?? false) ? (i) async => log.snapshot(name: 'move #$i') : null,
),
preCondition: null,
logTitle: 'MULTI DRAG',
Expand Down
12 changes: 4 additions & 8 deletions packages/convenient_test_dev/lib/src/utils/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class DelegatingFinder implements Finder {
@Deprecated('Override FinderBase.findInCandidates instead. '
'Using the FinderBase API allows for more consistent caching behavior and cleaner options for interacting with the widget tree. '
'This feature was deprecated after v3.13.0-0.2.pre.')
Iterable<Element> apply(Iterable<Element> candidates) =>
target.apply(candidates);
Iterable<Element> apply(Iterable<Element> candidates) => target.apply(candidates);

@override
bool get skipOffstage => target.skipOffstage;
Expand All @@ -58,20 +57,17 @@ class DelegatingFinder implements Finder {
Finder at(int index) => target.at(index);

@override
Finder hitTestable({Alignment at = Alignment.center}) =>
target.hitTestable(at: at);
Finder hitTestable({Alignment at = Alignment.center}) => target.hitTestable(at: at);

@override
String toString({bool describeSelf = false}) =>
target.toString(describeSelf: describeSelf);
String toString({bool describeSelf = false}) => target.toString(describeSelf: describeSelf);

@override
String describeMatch(Plurality plurality) =>
overrideDescribeMatch?.call(plurality) ?? target.describeMatch(plurality);

@override
Iterable<Element> findInCandidates(Iterable<Element> candidates) =>
target.findInCandidates(candidates);
Iterable<Element> findInCandidates(Iterable<Element> candidates) => target.findInCandidates(candidates);

@override
FinderResult<Element> get found => target.found;
Expand Down

0 comments on commit 3185dcb

Please sign in to comment.