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
mgr/dashboard: Hosts Page Service Links Test #29516
Conversation
jenkins test dashboard |
jenkins test dashboard |
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.
Tested it locally and it works 👍
Update:
|
// check is any services links are present | ||
services.getText().then((txt) => { | ||
// check that text (links) is present in services box | ||
if (txt.length === 0) { |
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.
Please use expect to validate this.
if (txt.length === 0) { | |
expect(txt.length).toBeGreaterThan(0); |
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 like the idea of adding in an expect expect to explicitly test this. However, I'd still like to leave the if block in. The reason being that the next line after the if block "const links = services.all(by.css('a.ng-star-inserted'));" will cause an Async Timeout error if no links are present (it seems to happen when you do a by css search on something that isn't there). Async Timeout errors will not only cause this test to fail but tend to also cause the next few tests to fail even if they should pass. To avoid that in the case of failure I think it would be fine to both have the explicit expect that tests that links are present and then also have the if to avoid the timeout that would occur afterwards if there are no links.
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.
It's also fine to just let this function end at this point as it will return a promise which is resolved in a function that expects if links_tested
is greater than 0, which in this case will still be 0.
Test at least one host is present Test links in "Services" column on hosts page properly link to Performance Counters pages Fixes: https://tracker.ceph.com/issues/41142 Signed-off-by: Adam King <adking@redhat.com> Signed-off-by: Rafael Quintero <rquinter@redhat.com>
Update:
|
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 for the update :) LGTM 👍
Test links in "Services" column on hosts page properly link to Performance Counters pages
Fixes: https://tracker.ceph.com/issues/41142
Signed-off-by: Adam King adking@redhat.com
Signed-off-by: Rafael Quintero rquinter@redhat.com