-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Add tests for CPU and memory graph pages #13439
Conversation
This will fail until landing PR #13438 |
The Oops on the graphs page is picked up by this new test as expected. |
Needs adjustment at least on fedora-coreos, as that doesn't have swap and thus uses a different memory graph. |
a8ba0bd
to
e0ad8f7
Compare
e0ad8f7
to
73da792
Compare
Broken on rhel-8-2-distropkg, so I pushed a fix to skip the test there until the fix lands in our image. |
b.click("#link-cpu") | ||
b.wait_not_visible(".ct-graph-memory") | ||
b.wait_visible("#cpu_status_title") | ||
b.wait_visible("#cpu_status_graph") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that we are also going to check that the height (and width) is some reasonable number. Something like:
width = b.call_js_func('(function (sel) { return ph_find(sel).offsetWidth; })', "#cpu_status_graph")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers! I pushed the size check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests have the final word, but it looks good, thanks!
Just one comment, but it still does not check the graphs, so good as is.
This makes sure that the page configures as expected and doesn't crash. Don't test the innards of the graph again, as they are exactly the same widgets as the ones already tested further above. But do ensure that they have a reasonable size. Reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1792623 Closes cockpit-project#13439
73da792
to
4d6e866
Compare
@marusak: Can you please re-review? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
This makes sure that the page configures as expected and doesn't crash.
Don't test the innards of the graph again, as they are exactly the same
widgets as the ones already tested further above.
Reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1792623