Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Ignore bottom panel in TestHistoryMetrics.testEvents pixel test #21423

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Dec 11, 2024

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

@martinpitt martinpitt added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Dec 11, 2024
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 cockpit-project#21422
@martinpitt martinpitt marked this pull request as ready for review December 11, 2024 15:10
@martinpitt martinpitt requested a review from mvollmer December 11, 2024 15:10
@martinpitt
Copy link
Member Author

@mvollmer This is an utter hack. Please tell me I missed something, and there's a better way 🙈

@@ -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'")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use mock for this?

mock={ ".bottom-panel": "" }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great idea, but unfortunately not. It produces this:

TestHistoryMetrics-testEvents-metrics-history-compressed-hour-medium-pixels

which valdalizes the button, but keeps the problematic space.

@martinpitt martinpitt merged commit ab2d7be into cockpit-project:main Dec 12, 2024
35 checks passed
@martinpitt martinpitt deleted the history-flake branch December 12, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestHistoryMetrics.testEvents pixel flake
2 participants