Skip to content

Commit 8bcf10c

Browse files
committed
Remove ColorSpace. from color string
1 parent 83ff6c9 commit 8bcf10c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/core/test/src/core_legacy_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ void main() {
8484
),
8585
useExplainer: false,
8686
);
87-
expect(explained, contains(abcdef.toString()));
87+
88+
// TODO: use hard coded value when our minimum Flutter version > 3.24
89+
final abcdefString = abcdef.toString().replaceAll('ColorSpace.', '');
90+
expect(explained, contains(abcdefString));
8891
});
8992
});
9093

packages/core/test/tag_li_test.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,16 +1000,20 @@ Future<void> main() async {
10001000
'<ul style="color: #f00"><li>Foo</li></ul>',
10011001
useExplainer: false,
10021002
);
1003+
1004+
// TODO: use hard coded value when our minimum Flutter version > 3.24
10031005
const red = Color(0xffff0000);
1004-
expect(disc, contains(red.toString()));
1006+
expect(disc, contains(red.toString().replaceAll('ColorSpace.', '')));
10051007

10061008
final circle = await explain(
10071009
tester,
10081010
'<ul style="color: #0f0"><li>Foo</li></ul>',
10091011
useExplainer: false,
10101012
);
1013+
1014+
// TODO: use hard coded value when our minimum Flutter version > 3.24
10111015
const green = Color(0xff00ff00);
1012-
expect(circle, contains(green.toString()));
1016+
expect(circle, contains(green.toString().replaceAll('ColorSpace.', '')));
10131017
});
10141018
});
10151019
}

0 commit comments

Comments
 (0)