Skip to content

Zulip test needs to migrate color assertions #155113

@gaaclarke

Description

@gaaclarke

After flutter/engine#54981 landed we experienced customer testing failures in Zulip so it had to be reverted. Now that dart:ui color is defined as floating-point numbers the isSameColorAs should be used for testing Color equality in tests.

Here's an example where I had to do that in the framework: https://github.com/flutter/flutter/pull/154752/files#diff-5e57f7f8adbaec70bf92aeb1da7f5b86d3f3f7b1239739f76b50615f09187015R197

This one is tricky because it looks like the difference in the floating point numbers is < 0.0001 which means it doesn't show up in the print statements. I'm not sure if there is a good remedy for that.

Please update the asserts or the customer test will be disabled in 72 hours (as per our SLA).

Thanks @chrisbobbe, sorry this popping up now. FWIW this is my last planned change to dart:ui Color for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions