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
dc47cf5c
Unverified
Commit
dc47cf5c
authored
Jun 14, 2021
by
Devon Carew
Committed by
GitHub
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the test expectations for the flutter widget transformer (#84578)
parent
52f7555f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
36 deletions
+2
-36
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+2
-2
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+0
-34
No files found.
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
dc47cf5c
...
...
@@ -2851,8 +2851,8 @@ class _Location {
required
this
.
file
,
required
this
.
line
,
required
this
.
column
,
required
this
.
name
,
required
this
.
parameterLocations
,
this
.
name
,
this
.
parameterLocations
,
});
/// File path of the location.
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
dc47cf5c
...
...
@@ -943,7 +943,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
String
fileA
=
creationLocationA
[
'file'
]!
as
String
;
final
int
lineA
=
creationLocationA
[
'line'
]!
as
int
;
final
int
columnA
=
creationLocationA
[
'column'
]!
as
int
;
final
List
<
Object
?>
parameterLocationsA
=
creationLocationA
[
'parameterLocations'
]!
as
List
<
Object
?>;
service
.
setSelection
(
elementB
,
'my-group'
);
final
Map
<
String
,
Object
?>
jsonB
=
json
.
decode
(
service
.
getSelectedWidget
(
null
,
'my-group'
))
as
Map
<
String
,
Object
?>;
...
...
@@ -952,7 +951,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
String
fileB
=
creationLocationB
[
'file'
]!
as
String
;
final
int
lineB
=
creationLocationB
[
'line'
]!
as
int
;
final
int
columnB
=
creationLocationB
[
'column'
]!
as
int
;
final
List
<
Object
?>
parameterLocationsB
=
creationLocationB
[
'parameterLocations'
]!
as
List
<
Object
?>;
expect
(
fileA
,
endsWith
(
'widget_inspector_test.dart'
));
expect
(
fileA
,
equals
(
fileB
));
// We don't hardcode the actual lines the widgets are created on as that
...
...
@@ -961,21 +959,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
// Column numbers are more stable than line numbers.
expect
(
columnA
,
equals
(
15
));
expect
(
columnA
,
equals
(
columnB
));
expect
(
parameterLocationsA
.
length
,
equals
(
1
));
final
Map
<
String
,
Object
?>
paramA
=
parameterLocationsA
[
0
]!
as
Map
<
String
,
Object
?>;
expect
(
paramA
[
'name'
],
equals
(
'data'
));
expect
(
paramA
[
'line'
],
equals
(
lineA
));
expect
(
paramA
[
'column'
],
equals
(
20
));
expect
(
parameterLocationsB
.
length
,
equals
(
2
));
final
Map
<
String
,
Object
?>
paramB1
=
parameterLocationsB
[
0
]!
as
Map
<
String
,
Object
?>;
expect
(
paramB1
[
'name'
],
equals
(
'data'
));
expect
(
paramB1
[
'line'
],
equals
(
lineB
));
expect
(
paramB1
[
'column'
],
equals
(
20
));
final
Map
<
String
,
Object
?>
paramB2
=
parameterLocationsB
[
1
]!
as
Map
<
String
,
Object
?>;
expect
(
paramB2
[
'name'
],
equals
(
'textDirection'
));
expect
(
paramB2
[
'line'
],
equals
(
lineB
));
expect
(
paramB2
[
'column'
],
equals
(
25
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
testWidgets
(
'test transformDebugCreator will re-order if after stack trace'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -1743,7 +1726,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
String
fileA
=
creationLocationA
[
'file'
]!
as
String
;
final
int
lineA
=
creationLocationA
[
'line'
]!
as
int
;
final
int
columnA
=
creationLocationA
[
'column'
]!
as
int
;
final
List
<
Object
?>
parameterLocationsA
=
creationLocationA
[
'parameterLocations'
]!
as
List
<
Object
?>;
service
.
setSelection
(
elementB
,
'my-group'
);
final
Map
<
String
,
Object
?>
jsonB
=
(
await
service
.
testExtension
(
'getSelectedWidget'
,
<
String
,
String
>{
'objectGroup'
:
'my-group'
}))!
as
Map
<
String
,
Object
?>;
...
...
@@ -1752,7 +1734,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
final
String
fileB
=
creationLocationB
[
'file'
]!
as
String
;
final
int
lineB
=
creationLocationB
[
'line'
]!
as
int
;
final
int
columnB
=
creationLocationB
[
'column'
]!
as
int
;
final
List
<
Object
?>
parameterLocationsB
=
creationLocationB
[
'parameterLocations'
]!
as
List
<
Object
?>;
expect
(
fileA
,
endsWith
(
'widget_inspector_test.dart'
));
expect
(
fileA
,
equals
(
fileB
));
// We don't hardcode the actual lines the widgets are created on as that
...
...
@@ -1761,21 +1742,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
// Column numbers are more stable than line numbers.
expect
(
columnA
,
equals
(
15
));
expect
(
columnA
,
equals
(
columnB
));
expect
(
parameterLocationsA
.
length
,
equals
(
1
));
final
Map
<
String
,
Object
?>
paramA
=
parameterLocationsA
[
0
]!
as
Map
<
String
,
Object
?>;
expect
(
paramA
[
'name'
],
equals
(
'data'
));
expect
(
paramA
[
'line'
],
equals
(
lineA
));
expect
(
paramA
[
'column'
],
equals
(
20
));
expect
(
parameterLocationsB
.
length
,
equals
(
2
));
final
Map
<
String
,
Object
?>
paramB1
=
parameterLocationsB
[
0
]!
as
Map
<
String
,
Object
?>;
expect
(
paramB1
[
'name'
],
equals
(
'data'
));
expect
(
paramB1
[
'line'
],
equals
(
lineB
));
expect
(
paramB1
[
'column'
],
equals
(
20
));
final
Map
<
String
,
Object
?>
paramB2
=
parameterLocationsB
[
1
]!
as
Map
<
String
,
Object
?>;
expect
(
paramB2
[
'name'
],
equals
(
'textDirection'
));
expect
(
paramB2
[
'line'
],
equals
(
lineB
));
expect
(
paramB2
[
'column'
],
equals
(
25
));
},
skip:
!
WidgetInspectorService
.
instance
.
isWidgetCreationTracked
());
// Test requires --track-widget-creation flag.
testWidgets
(
'ext.flutter.inspector.setPubRootDirectories'
,
(
WidgetTester
tester
)
async
{
...
...
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