Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob314 committed Jan 17, 2019
1 parent 844d0de commit de15da8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
3 changes: 1 addition & 2 deletions test/goldens/inspector_controller_details_tree_scaffold.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
└─▼[C] CustomMultiChildLayout
├───▼[L] LayoutId [<_ScaffoldSlot.body>]
│ └─▼[/icons/inspector/atrule.png] MediaQuery
│ └─▼[C] Center
│ └─▶[/icons/inspector/textArea.png] Text
│ └─▶[C] Center
├───▼[L] LayoutId [<_ScaffoldSlot.appBar>]
│ └─▼[/icons/inspector/atrule.png] MediaQuery
│ └─▼[C] ConstrainedBox
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
▼[S] Scaffold <-- selected
└─▼[S] _ScaffoldScope
└─▼[P] PrimaryScrollController
└─▼[M] Material
└─▼[/icons/inspector/resume.png] AnimatedPhysicalModel
└─▼[P] PhysicalModel
└─▼[N] NotificationListener <LayoutChangedNotification>
└─▼[I] _InkFeatures [GlobalKey#00000 ink renderer]
└─▼[/icons/inspector/resume.png] AnimatedDefaultTextStyle
└─▼[/icons/inspector/textArea.png] DefaultTextStyle
└─▼[/icons/inspector/resume.png] AnimatedBuilder
└─▼[C] CustomMultiChildLayout
├───▼[L] LayoutId [<_ScaffoldSlot.body>]
│ └─▼[/icons/inspector/atrule.png] MediaQuery
│ └─▼[C] Center
│ └─▶[/icons/inspector/textArea.png] Text
├───▼[L] LayoutId [<_ScaffoldSlot.appBar>]
│ └─▼[/icons/inspector/atrule.png] MediaQuery
│ └─▼[C] ConstrainedBox
│ └─▼[F] FlexibleSpaceBarSettings
│ └─▶[A] AppBar
└─▼[L] LayoutId [<_ScaffoldSlot.floatingActionButton>]
└─▼[/icons/inspector/atrule.png] MediaQuery
└─▼[F] _FloatingActionButtonTransition
└─▼[/icons/inspector/value.png] Stack
└─▼[/icons/inspector/resume.png] ScaleTransition
└─▼[/icons/inspector/colors.png] Transform
└─▼[/icons/inspector/resume.png] RotationTransition
└─▼[/icons/inspector/colors.png] Transform
3 changes: 2 additions & 1 deletion test/inspector_controller_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,11 @@ void main() async {
));

// Verify that the details tree scrolled back as well.
// However, now more nodes are expanded.
expect(
detailsTree.toStringDeep(hidePropertyLines: true),
equalsGoldenIgnoringHashCodes(
'inspector_controller_details_tree_scaffold.txt'),
'inspector_controller_details_tree_scaffold_expanded.txt'),
);

expect(
Expand Down
2 changes: 1 addition & 1 deletion test/matchers/matchers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class _EqualsGoldenIgnoringHashCodes extends Matcher {
// description returned by addDescriptionOf are all indented equally
// which makes the output easier to read for this case.
return mismatchDescription
.add('expected normalized value\n ')
.add('expected golden file \'$path\' with normalized value\n ')
.addDescriptionOf(_value)
.add('\nbut got\n ')
.addDescriptionOf(actualValue)
Expand Down

0 comments on commit de15da8

Please sign in to comment.