[Libreoffice-commits] core.git: sw/source uitest/writer_tests5
Xisco Faulà (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 22 11:51:02 UTC 2020
sw/source/uibase/inc/conttree.hxx | 5 -----
sw/source/uibase/uitest/uiobject.cxx | 1 -
uitest/writer_tests5/tdf114724.py | 18 +++---------------
3 files changed, 3 insertions(+), 21 deletions(-)
New commits:
commit 0b48cee16d459d27ebd090d008ec9398c86fc581
Author: Xisco Faulí <xiscofauli at libreoffice.org>
AuthorDate: Wed Apr 22 12:02:38 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Apr 22 13:50:26 2020 +0200
Revert "tdf114724: uitest: make test less time.sleep dependent"
This reverts commit 634ce6f2d87a30b8abd2e8c67668e3bb5d87406b.
See https://gerrit.libreoffice.org/c/core/+/92616
Change-Id: I642843ab16450d1a6b15d5e955495efbbfa7822a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92539
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 59df0d51c3ea..28ea07a1c1de 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -247,11 +247,6 @@ 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 baa9e79bafb8..a0b8da9e9d97 100644
--- a/sw/source/uibase/uitest/uiobject.cxx
+++ b/sw/source/uibase/uitest/uiobject.cxx
@@ -139,7 +139,6 @@ 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;
}
diff --git a/uitest/writer_tests5/tdf114724.py b/uitest/writer_tests5/tdf114724.py
index f5947a21e321..390e53b3ac37 100644
--- a/uitest/writer_tests5/tdf114724.py
+++ b/uitest/writer_tests5/tdf114724.py
@@ -26,28 +26,16 @@ class tdf114724(UITestCase):
xNavigatorPanel.executeAction("ROOT", tuple())
xWriterEdit.executeAction("FOCUS", tuple())
+ time.sleep(2)
self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "Headings")
-
for _ in range(0,3):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
+ time.sleep(2)
self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
-
- timeout = time.time() + 2
- while get_state_as_dict(xNavigatorPanel)["selectedtext"] != "HEADING 4" and time.time() < timeout:
- time.sleep(0.1)
-
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 4")
-
for _ in range(0,3):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+ time.sleep(2)
self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
- timeout = time.time() + 2
- while get_state_as_dict(xNavigatorPanel)["selectedtext"] != "HEADING 1" and time.time() < timeout:
- time.sleep(0.1)
-
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 1")
-
self.xUITest.executeCommand(".uno:Sidebar")
self.ui_test.close_doc()
More information about the Libreoffice-commits
mailing list