diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-06 16:39:37 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-06 17:49:38 +0200 |
commit | 47c0cea5aae8f1ac5c8d79fc09a30c8c5f14af64 (patch) | |
tree | 98041bcb3aaefbe4ae1fd20155a08062d0fd4e66 /sw | |
parent | 473c68d0f8014c1f594e6f4c683594024a307007 (diff) |
tdf#126226: sw: Add UItest
Change-Id: Id236fa585ae02cb0282a7d6179b9cb2d779dfdf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115182
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/data/tdf126226.odt | bin | 0 -> 9544 bytes | |||
-rw-r--r-- | sw/qa/uitest/writer_tests6/tdf126226.py | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/uitest/data/tdf126226.odt b/sw/qa/uitest/data/tdf126226.odt Binary files differnew file mode 100644 index 000000000000..aa0b4cd2b0ac --- /dev/null +++ b/sw/qa/uitest/data/tdf126226.odt diff --git a/sw/qa/uitest/writer_tests6/tdf126226.py b/sw/qa/uitest/writer_tests6/tdf126226.py new file mode 100644 index 000000000000..e13505fc1f64 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126226.py @@ -0,0 +1,29 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file + +class Tdf126226(UITestCase): + + def test_tdf126226(self): + writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126226.odt")) + + self.xUITest.executeCommand(".uno:SelectAll") + + # Without the fix in place, this test would have crashed here + self.ui_test.execute_dialog_through_command(".uno:CommentChangeTracking") + + xDialog = self.xUITest.getTopFocusWindow() + + self.assertEqual("Hello\n", get_state_as_dict(xDialog.getChild("edit"))["Text"]) + self.assertEqual("Autor desconocido, 07/04/2019 13:43:52", + get_state_as_dict(xDialog.getChild("lastedit"))["Text"]) + + xOKBtn = xDialog.getChild("ok") + self.ui_test.close_dialog_through_button(xOKBtn) + + self.ui_test.close_doc() |