Skip to content

Commit

Permalink
Analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Aug 17, 2023
1 parent 7e3e1cf commit 5e13175
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions lib/spot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export 'package:spot/src/checks/checks.dart'
it;
export 'package:spot/src/checks/context.dart'
show
Subject,
Context,
ConditionSubject,
Condition,
ConditionSubject,
Context,
ContextExtension,
Extracted,
Rejection,
Extracted;
Subject;

export 'package:spot/src/default_selectors.dart';
export 'package:spot/src/effective_text.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/src/effective_text.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:spot/spot.dart';
import 'package:spot/src/checks/src/checks.dart';
import 'package:spot/src/element_extensions.dart';

extension EffectiveTextMatcher on WidgetMatcher<Text> {
Expand Down
12 changes: 6 additions & 6 deletions lib/src/selectors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mixin Selectors<T extends Widget> {
PredicateWithDescription(
(Element e) => identical(e.widget, widget),
description: 'Widget === $widget',
)
),
],
parents: [if (self != null) self!, ...parents],
children: children,
Expand Down Expand Up @@ -336,7 +336,7 @@ extension SelectorQueries<W extends Widget> on Selectors<W> {
PredicateWithDescription(
(Element e) => predicate(e),
description: description,
)
),
],
);
}
Expand All @@ -356,7 +356,7 @@ extension SelectorQueries<W extends Widget> on Selectors<W> {
return false;
},
description: description,
)
),
],
);
}
Expand Down Expand Up @@ -397,7 +397,7 @@ extension WidgetMatcherExtensions<W extends Widget> on WidgetMatcher<W> {
if (prop.value is! T) {
return Extracted.rejection(
which: [
'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"'
'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"',
],
);
}
Expand Down Expand Up @@ -637,7 +637,7 @@ class WidgetSelector<W extends Widget> with Selectors<W> {
PredicateWithDescription(
(e) => true,
description: 'any Widget',
)
),
],
);

Expand Down Expand Up @@ -810,7 +810,7 @@ class WidgetSelector<W extends Widget> with Selectors<W> {
if (prop.value is! T) {
return Extracted.rejection(
which: [
'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"'
'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"',
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions test/selectors/multi_matchers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void main() {
icon.hasColorWhere((color) => color.equals(Colors.black));
}),
throwsSpotErrorContaining([
"Expected that all candidates fulfill matcher 'property color that: equals <Color(0xff000000)>', but only 0 of 2 did."
"Expected that all candidates fulfill matcher 'property color that: equals <Color(0xff000000)>', but only 0 of 2 did.",
]),
);
});
Expand Down Expand Up @@ -139,7 +139,7 @@ void main() {
icon.hasColorWhere((color) => color.equals(Colors.black));
}),
throwsSpotErrorContaining([
"Expected that at least one candidate fulfills matcher 'property color that: equals <Color(0xff000000)>', but none did."
"Expected that at least one candidate fulfills matcher 'property color that: equals <Color(0xff000000)>', but none did.",
]),
);
});
Expand Down
4 changes: 2 additions & 2 deletions test/selectors/spot_key_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void main() {
Text('x', key: key1),
Text('y', key: key2),
],
)
),
],
),
),
Expand Down Expand Up @@ -132,7 +132,7 @@ void main() {
Text('x', key: key1),
Text('y', key: key2),
],
)
),
],
),
),
Expand Down
3 changes: 2 additions & 1 deletion test/widgets/text_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ void main() {
await widgetTester.pumpWidget(
MaterialApp(
home: Column(
// ignore: require_trailing_commas
children: [
EditableText(
controller: TextEditingController(text: 'foo'),
focusNode: FocusNode(),
style: TextStyle(),
cursorColor: Colors.black,
backgroundCursorColor: Colors.black,
)
),
],
),
),
Expand Down

0 comments on commit 5e13175

Please sign in to comment.