Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
91b67e8e
Unverified
Commit
91b67e8e
authored
Jul 20, 2021
by
Danny Tuppeny
Committed by
GitHub
Jul 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a "variant: " prefix to variant descriptions in test names (#86701)
parent
7d026b6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+7
-1
widget_tester_test.dart
packages/flutter_test/test/widget_tester_test.dart
+4
-1
No files found.
packages/flutter_test/lib/src/widget_tester.dart
View file @
91b67e8e
...
...
@@ -149,7 +149,13 @@ void testWidgets(
final
WidgetTester
tester
=
WidgetTester
.
_
(
binding
);
for
(
final
dynamic
value
in
variant
.
values
)
{
final
String
variationDescription
=
variant
.
describeValue
(
value
);
final
String
combinedDescription
=
variationDescription
.
isNotEmpty
?
'
$description
(
$variationDescription
)'
:
description
;
// IDEs may make assumptions about the format of this suffix in order to
// support running tests directly from the editor (where they may have
// access to only the test name, provided by the analysis server).
// See https://github.com/flutter/flutter/issues/86659.
final
String
combinedDescription
=
variationDescription
.
isNotEmpty
?
'
$description
(variant:
$variationDescription
)'
:
description
;
test
(
combinedDescription
,
()
{
...
...
packages/flutter_test/test/widget_tester_test.dart
View file @
91b67e8e
...
...
@@ -697,7 +697,10 @@ void main() {
if
(
debugDefaultTargetPlatformOverride
==
null
)
{
expect
(
tester
.
testDescription
,
equals
(
'variant tests have descriptions with details'
));
}
else
{
expect
(
tester
.
testDescription
,
equals
(
'variant tests have descriptions with details (
$debugDefaultTargetPlatformOverride
)'
));
expect
(
tester
.
testDescription
,
equals
(
'variant tests have descriptions with details (variant:
$debugDefaultTargetPlatformOverride
)'
),
);
}
},
variant:
TargetPlatformVariant
(
TargetPlatform
.
values
.
toSet
()));
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment