[Libreoffice-commits] core.git: sw/qa sw/source
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 16 18:55:40 UTC 2020
sw/qa/uitest/writer_tests4/start.py | 6 ++++++
sw/source/uibase/uitest/uiobject.cxx | 2 ++
2 files changed, 8 insertions(+)
New commits:
commit 261b48affaf6d963de312c27f2cac1a95625c6a2
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Dec 16 16:45:16 2020 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Dec 16 19:54:55 2020 +0100
uitest: sw: Add missing asserts
Change-Id: Idacea3eae1124778cbec98af6424f2462b4ef78f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107842
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/qa/uitest/writer_tests4/start.py b/sw/qa/uitest/writer_tests4/start.py
index c514d39d8c52..8be8322f519f 100644
--- a/sw/qa/uitest/writer_tests4/start.py
+++ b/sw/qa/uitest/writer_tests4/start.py
@@ -22,6 +22,8 @@ class SimpleWriterTest(UITestCase):
xWriterEdit.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
+ self.assertEqual(get_state_as_dict(xWriterEdit)["Zoom"], "200")
+
self.ui_test.close_doc()
def test_goto_first_page(self):
@@ -36,8 +38,12 @@ class SimpleWriterTest(UITestCase):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
state = get_state_as_dict(xWriterEdit)
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "1"}))
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx
index 9c63c568a490..44b995dcf588 100644
--- a/sw/source/uibase/uitest/uiobject.cxx
+++ b/sw/source/uibase/uitest/uiobject.cxx
@@ -14,6 +14,7 @@
#include <wrtsh.hxx>
#include <navipi.hxx>
#include <ndtxt.hxx>
+#include <viewopt.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
#include <sfx2/viewfrm.hxx>
@@ -49,6 +50,7 @@ StringMap SwEditWinUIObject::get_state()
aMap["CurrentPage"] = OUString::number(nPageNum);
rWrtShell.GetPageNum(nPageNum, nVirtPageNum, false);
aMap["TopVisiblePage"] = OUString::number(nPageNum);
+ aMap["Zoom"] = OUString::number(rWrtShell.GetViewOptions()->GetZoom());
sal_uInt16 nPages = rWrtShell.GetPageCnt();
aMap["Pages"] = OUString::number(nPages);
More information about the Libreoffice-commits
mailing list