Skip to content

Commit da0e4da

Browse files
committed
test: sample padding-band pixel in WbReceipt background test for cross-platform stability
1 parent 28ff995 commit da0e4da

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/FlexRender.Tests/Integration/WbReceiptIntegrationTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ public async Task WbReceipt_TextWithBackgroundButton_Renders()
107107

108108
Assert.Null(exception);
109109

110-
// The text background should be black
111-
var pixel = bitmap.GetPixel(10, 15);
110+
// A pixel inside the element's top-left padding band must be the black
111+
// background (padding is 8px, so (2,2) is inside the box but never covered
112+
// by a glyph — glyphs are inset by the padding per the box model).
113+
var pixel = bitmap.GetPixel(2, 2);
112114
Assert.Equal(0, pixel.Red);
113115
Assert.Equal(0, pixel.Green);
114116
Assert.Equal(0, pixel.Blue);

0 commit comments

Comments
 (0)