Bug 1273962
| Summary: | New tooltips of in ovirt UI are not automation-friendly | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | movciari |
| Component: | Frontend.WebAdmin | Assignee: | Greg Sheremeta <gshereme> |
| Status: | CLOSED CANTFIX | QA Contact: | Pavel Stehlik <pstehlik> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 3.6.0 | CC: | bugs, ecohen, vszocs |
| Target Milestone: | ovirt-4.0.0-alpha | Flags: | ecohen:
ovirt-4.0.0?
rule-engine: planning_ack? rule-engine: devel_ack? rule-engine: testing_ack? |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | ux | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-13 22:05:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | UX | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
movciari
2015-10-21 15:17:52 UTC
Short-term workaround: utilize "aria-describedby" attribute that links to DOM element of the tooltip.
For example, VM main tab / Run Once button:
<div id="MainTabVirtualMachineView_table_Run" role="button">
After simulating mouse hover, it becomes:
<div id="MainTabVirtualMachineView_table_Run"
role="button" aria-describedby="tooltipXXXXXX">
Test script would therefore need to:
- trigger mouse hover on given DOM element
- parse value of "aria-describedby" attribute
- locate associated tooltip DOM element by ID
- extract text from tooltip DOM element
Above mentioned workaround is too complicated, I think.
I believe we can modify tooltip'ed DOM element to include tooltip text via simple DOM attribute.
For example, upon mouse hover, Run Once button would become:
<div id="MainTabVirtualMachineView_table_Run"
role="button" aria-describedby="tooltipXXXXXX"
data-tooltip-text="Run">
In other words, (currently unused) "title" attribute would become "data-tooltip-text" attribute.
Sorry for the trouble here. Relying on the text in a tooltip is dangerous for automation because the tooltips don't convey a meaning. That is, they can be used for just about anything by developers. A better way to test is to add data-xyz attributes as Vojtech suggests above. That way, if you want to check the status of a vm, simply read 'data-status.' For specific places where you can no longer easily grab data because of the tooltip changes, please open a bug for each one and I'll get them fixed. For Bug 1273970, I have added 'data-status' for vm status. Thanks! |