diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-21 12:10:40 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-21 15:34:37 +0200 |
commit | 634ce6f2d87a30b8abd2e8c67668e3bb5d87406b (patch) | |
tree | 3071fbc82a4b9388c44752f23972c7187edc1bc7 /sw | |
parent | c65d94abaf15e8b9b1054bf1850188d683459805 (diff) |
tdf114724: uitest: make test less time.sleep dependent
Instead, check the focus moved to the bottom and back to the
first element
Execution times goes 17.232 from to 5.521 for me
Change-Id: I816c197f44b68a1b9ab8686de191a743cbc78eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92616
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/conttree.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uitest/uiobject.cxx | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 28ea07a1c1de..59df0d51c3ea 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -247,6 +247,11 @@ public: m_xTreeView->grab_focus(); } + OUString get_selected_text() const + { + return m_xTreeView->get_selected_text(); + } + int count_selected_rows() const { return m_xTreeView->count_selected_rows(); diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index a0b8da9e9d97..baa9e79bafb8 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -139,6 +139,7 @@ StringMap SwNavigationPIUIObject::get_state() StringMap aMap = WindowUIObject::get_state(); aMap["selectioncount"] = OUString::number(mxSwNavigationPI->m_xContentTree->count_selected_rows()); + aMap["selectedtext"] = mxSwNavigationPI->m_xContentTree->get_selected_text(); return aMap; } |