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
f091654f
Unverified
Commit
f091654f
authored
Nov 11, 2021
by
Alexander Dahlberg
Committed by
GitHub
Nov 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed no-shuffle tag and fixed leak in flutter_goldens_test.dart (#92374)
parent
ea4e85dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
29 deletions
+2
-29
flutter_goldens_test.dart
packages/flutter_goldens/test/flutter_goldens_test.dart
+2
-29
No files found.
packages/flutter_goldens/test/flutter_goldens_test.dart
View file @
f091654f
...
...
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
// dependencies have been fixed.
// https://github.com/flutter/flutter/issues/85160
// Fails with "flutter test --test-randomize-ordering-seed=123"
@Tags
(<
String
>[
'no-shuffle'
])
// See also dev/automated_tests/flutter_test/flutter_gold_test.dart
import
'dart:async'
;
...
...
@@ -35,13 +29,6 @@ const List<int> _kTestPngBytes =
120
,
1
,
99
,
97
,
0
,
2
,
0
,
0
,
25
,
0
,
5
,
144
,
240
,
54
,
245
,
0
,
0
,
0
,
0
,
73
,
69
,
78
,
68
,
174
,
66
,
96
,
130
];
// 1x1 colored pixel
const
List
<
int
>
_kFailPngBytes
=
<
int
>[
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
,
0
,
0
,
0
,
13
,
73
,
72
,
68
,
82
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
8
,
6
,
0
,
0
,
0
,
31
,
21
,
196
,
137
,
0
,
0
,
0
,
13
,
73
,
68
,
65
,
84
,
120
,
1
,
99
,
249
,
207
,
240
,
255
,
63
,
0
,
7
,
18
,
3
,
2
,
164
,
147
,
160
,
197
,
0
,
0
,
0
,
0
,
73
,
69
,
78
,
68
,
174
,
66
,
96
,
130
];
void
main
(
)
{
late
MemoryFileSystem
fs
;
late
FakePlatform
platform
;
...
...
@@ -573,22 +560,6 @@ void main() {
);
});
test
(
'compare properly awaits validation & output before failing.'
,
()
async
{
final
Completer
<
bool
>
completer
=
Completer
<
bool
>();
final
Future
<
bool
>
result
=
comparator
.
compare
(
Uint8List
.
fromList
(
_kFailPngBytes
),
Uri
.
parse
(
'flutter.golden_test.1.png'
),
);
bool
shouldThrow
=
true
;
result
.
then
((
_
)
{
if
(
shouldThrow
)
fail
(
'Compare completed before validation completed!'
);
});
await
Future
<
void
>.
value
();
shouldThrow
=
false
;
completer
.
complete
(
Future
<
bool
>.
value
(
false
));
});
test
(
'returns FlutterSkippingGoldenFileComparator when network connection is unavailable'
,
()
async
{
final
FakeDirectory
fakeDirectory
=
FakeDirectory
();
fakeDirectory
.
existsSyncValue
=
true
;
...
...
@@ -611,6 +582,8 @@ void main() {
baseDirectory:
fakeDirectory
,
);
expect
(
comparator
.
runtimeType
,
FlutterSkippingFileComparator
);
// reset property or it will carry on to other tests
fakeSkiaClient
.
getExpectationForTestThrowable
=
null
;
});
});
});
...
...
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