]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: replace E2E test `moveClick` with `clickCheckbox`
authorPatrick Seidensal <pseidensal@suse.com>
Wed, 14 Aug 2019 09:59:45 +0000 (11:59 +0200)
committerPatrick Seidensal <pseidensal@suse.com>
Wed, 28 Aug 2019 07:38:48 +0000 (09:38 +0200)
commitbe3d0c0fa387e1adc7c9c89951f71cb7ba3e8873
tree32e890a814151cffaa3bc8eed8b22633fe89400b
parenta69a804e590ffa524b630660edf4d79ffaaefd91
mgr/dashboard: replace E2E test `moveClick` with `clickCheckbox`

Ceph Dashboard replaces the original checkbox with a fancy replacement
using the pseudo selector "::before" inside the <label> tag. When the
fancy replacement checkbox is clicked, it actually triggers a click on
the label of the checkbox. `clickCheckbox` does the same.

Removed `moveClick` as it was used to perform an action that the user
would not be able to perform, namely clicking on the checkbox instead of
the checkboxes' label. It was also used for cases where it was not
necessary to be used for, hence the replacement `clickCheckbox` has been
introduced. It checks if the argument passed to it is of type `checkbox`
or `label`. If it is of type `label`, the label will be clicked. If it
is of type `checkbox`, the corresponding `label` is determined and
clicked. This replaces the old implementation with a solution that has
an easy to understand purpose. It also prevents every false application.

This method is designed to be used on all checkboxes of Ceph Dashboard.

Fixes: https://tracker.ceph.com/issues/40693
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts