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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/verify/check-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -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.


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")
Expand Down
Loading