Skip to content

Commit

Permalink
test: Ignore bottom panel in TestHistoryMetrics.testEvents pixel test
Browse files Browse the repository at this point in the history
In the medium layout, the bottom panel sometimes has an extra white
background line (padding). This is random and unpredictable (probably
rounding noise?). That panel only contains a single standard button, so
is not very interesting.

Just ignore that part.

Fixes cockpit-project#21422
  • Loading branch information
martinpitt committed Dec 11, 2024
1 parent 35090b7 commit 3a6de04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/verify/check-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ class TestHistoryMetrics(testlib.MachineCase):
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed .spikes_count", "3 spikes")
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed .spikes_info", "1 Memory, 1 Disk I/O, 1 Network I/O")

b.assert_pixels(".metrics", "metrics-history-compressed-hour", ignore=[".nodata"],
# the bottom panel has some unpredictable padding height (± one pixel of extra background) in the medium layout
b.assert_pixels(".metrics", "metrics-history-compressed-hour", ignore=[".nodata", ".bottom-panel"],
skip_layouts=["mobile"], wait_after_layout_change=True)

# Check that events are not visible for compressed hours
Expand Down

0 comments on commit 3a6de04

Please sign in to comment.