-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Labels
a-contentParsing and rendering Zulip HTML content, notably message contentsParsing and rendering Zulip HTML content, notably message contents
Milestone
Description
Web:

Mobile:

We even have a test that the clock icon and the date-time text are the same color as each other:
- when the global time appears in a link span, and
- when it doesn't
void testIconAndTextSameColor(String description, String html) {
testWidgets('clock icon and text are the same color: $description', (tester) async {
await prepareContent(tester,
// We use the self-account's time-format setting.
wrapWithPerAccountStoreWidget: true,
plainContent(html));
final icon = tester.widget<Icon>(
find.descendant(of: find.byType(GlobalTime),
matching: find.byIcon(ZulipIcons.clock)));
final textColor = mergedStyleOf(tester,
findAncestor: find.byType(GlobalTime), renderedTextRegexp)!.color;
check(textColor).isNotNull();
check(icon).color.isNotNull().isSameColorAs(textColor!);
});
}
testIconAndTextSameColor('common case', '<p>$timeSpanHtml</p>');
testIconAndTextSameColor('inside link', '<p><a href="https://example/">$timeSpanHtml</a></p>');
But the in-link-span test doesn't do the further check that that color is blue, which allowed this bug to slip through. 🫠
Metadata
Metadata
Assignees
Labels
a-contentParsing and rendering Zulip HTML content, notably message contentsParsing and rendering Zulip HTML content, notably message contents
Type
Projects
Status
No status