From ab2d7bea1cc9b379988412a841de2e41548e8259 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Dec 2024 14:13:06 +0100 Subject: [PATCH] test: Ignore bottom panel in TestHistoryMetrics.testEvents pixel test 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. We can't use `ignore=` for that, as the difference is the snapshot height, not the pixel contents. So instead, temporarily hide the whole bottom panel for the snapshot. Fixes #21422 --- test/reference | 2 +- test/verify/check-metrics | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/reference b/test/reference index 5c199a0ad388..b8704b853a9e 160000 --- a/test/reference +++ b/test/reference @@ -1 +1 @@ -Subproject commit 5c199a0ad38818061c93f27b16c9055ccf14b04d +Subproject commit b8704b853a9ebd0f137c55ea95bc2e8b818a3148 diff --git a/test/verify/check-metrics b/test/verify/check-metrics index e9062e9c2fa4..c67d1a617613 100755 --- a/test/verify/check-metrics +++ b/test/verify/check-metrics @@ -247,9 +247,14 @@ 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") + # HACK: the bottom panel has some unpredictable extra white line at the bottom, but is also uninteresting + b.eval_js("document.querySelector('.bottom-panel').style.display = 'none'") + b.assert_pixels(".metrics", "metrics-history-compressed-hour", ignore=[".nodata"], skip_layouts=["mobile"], wait_after_layout_change=True) + b.eval_js("document.querySelector('.bottom-panel').style.removeProperty('display')") + # Check that events are not visible for compressed hours b.wait_not_present("#metrics-hour-1597662000000 div.metrics-minute[data-minute='28'] .metrics-events") b.click("#metrics-hour-1597662000000 button.metrics-events-expander")