Skip to content

Commit

Permalink
test: Wait a bit after switching to "mobile" for some metrics pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer committed Sep 8, 2023
1 parent 770f4c9 commit bad736f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/verify/check-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,18 @@ class TestHistoryMetrics(testlib.MachineCase):
b.wait_in_text("#metrics-hour-1597662000000:not(.metrics-hour-compressed) .metrics-events-hour-header-expanded .spikes_count", "3 spikes")
b.wait_in_text("#metrics-hour-1597662000000:not(.metrics-hour-compressed) .metrics-events-hour-header-expanded .spikes_info", "1 Memory, 1 Disk I/O, 1 Network I/O")

b.assert_pixels(".metrics", "metrics-history-expanded-hour", ignore=[".spikes_count"])
# There is something really funny going on with the navigation
# bar in the mobile layout; it sometimes appears in a random
# position in the screenshot. We fix that by adding an extra
# delay after switching to "mobile".

b.assert_pixels(".metrics", "metrics-history-expanded-hour", ignore=[".spikes_count"],
skip_layouts=["mobile"])
b.set_layout("mobile")
time.sleep(1.0)
b.assert_pixels_in_current_layout(".metrics", "metrics-history-expanded-hour",
ignore=[".spikes_count"])
b.set_layout("desktop")

b.click("#metrics-hour-1597662000000 button.metrics-events-expander")
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed", "1:00")
Expand Down

0 comments on commit bad736f

Please sign in to comment.