Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[RFE] With automation, I should able to drop DashboardWidget at the last position of dashboard column #6268

Open
Yadnyawalkya opened this issue Dec 23, 2017 · 0 comments

Comments

@Yadnyawalkya
Copy link
Member

What is the issue?
When you manually drag DashboardWidget (DW) and try to drop at target location; placeholder pops up and when you release mouse, DW will be placed in that particular placeholder. All this things works well manually but in automation, it is not working when you put DW in last position of dashboard column.

What is happening here?
Automation not finding that placeholder when you choose last position and so it is not releasing mouse; in a result, dragged DW not able to drop to the target location. (Visually DW in the air now, but you will find DW name appended to source's column list)

Automation not releasing DashboardWidget

Test case cfme/tests/intelligence/test_dashboard.py/test_drag_and_drop_widget_to_the_bottom_of_another_column contains:

first_column = dashboards.default.dashboard_view.column_widget_names(1) # list of first column
second_column = dashboards.default.dashboard_view.column_widget_names(2) # list of second column
dashboards.default.drag_and_drop(first_widget_name[0], second_widget_name[-1]) # mouse not releasing here
assert dashboards.default.dashboard_view.column_widget_names(2)[-1] == first_widget_name 
# You will find first_widget_name[0] appended in first_column's list instead of second_column[-1]

Solution I tried and worked:

first_column = dashboards.default.dashboard_view.column_widget_names(1) 
second_column = dashboards.default.dashboard_view.column_widget_names(2)
dashboards.default.drag_and_drop(first_widget_name[0], second_widget_name[-2]) # Changed [-1] to [-2]
assert dashboards.default.dashboard_view.column_widget_names(2)[-2] == first_widget_name # Changed [-1] to [-2]
# You will find all the things working as expected now

Above is just the workaround, we should fix this issue of releasing mouse. I tried and failed. I barely understood selenium code and thus mentioned problem here is what I understood from automation scenario I performed, recommend to check this once by you own.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant