Skip to content

Conversation

@HansMuller
Copy link
Contributor

Fixes #7672

@Hixie
Copy link
Contributor

Hixie commented Jan 27, 2017

LGTM

How was your experience with paints?

@HansMuller
Copy link
Contributor Author

vis paints: I was able to make a proper regression test without any trouble. However I wanted to overachieve and add tests for Borders with 2-4 different color sides.

However to do that I'd have to bake the order that the sides are painted into the test.

expect(find.byKey(key), paints
  ..path(color: red, style: PaintingStyle.fill) // top
  ..path(color: blue, style: PaintingStyle.fill) // right
  ..path(color: green, style: PaintingStyle.fill) // bottom
  ..path(color: orange, style: PaintingStyle.fill)); // left

Wiring the test to the current implementation didn't seem like a good idea, so I didn't.

I suppose if paints.path(color: red, style: PaintingStyle.fill) was true (maybe paints.contains.path...) if the display-list contained one such path element, then I could have written an expect statement for each border side.

@HansMuller HansMuller merged commit 1738924 into flutter:master Jan 27, 2017
@Hixie
Copy link
Contributor

Hixie commented Jan 27, 2017

Cool, thanks for the feedback.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Left border width ignored

3 participants