sw/qa/uitest/writer_tests/data/tdf117703.odt |binary sw/qa/uitest/writer_tests/wordCount.py | 33 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+)
New commits: commit 127696ba2b090c7ff93b6944b840e25acad63975 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Sep 4 15:58:56 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 4 17:30:28 2020 +0200 tdf#117703: sw: Add UItest Change-Id: I4f5e5daf95171036489a5c67256e153154309b6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102049 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/uitest/writer_tests/data/tdf117703.odt b/sw/qa/uitest/writer_tests/data/tdf117703.odt new file mode 100644 index 000000000000..2e72fb541ba3 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf117703.odt differ diff --git a/sw/qa/uitest/writer_tests/wordCount.py b/sw/qa/uitest/writer_tests/wordCount.py index 07a4c69342ba..1e43c3fb0fe7 100644 --- a/sw/qa/uitest/writer_tests/wordCount.py +++ b/sw/qa/uitest/writer_tests/wordCount.py @@ -295,4 +295,37 @@ class writerWordCount(UITestCase): xCloseBtn = xDialog.getChild("close") self.ui_test.close_dialog_through_button(xCloseBtn) self.ui_test.close_doc() + + def test_tdf117703(self): + self.ui_test.load_file(get_url_for_data_file("tdf117703.odt")) + self.xUITest.getTopFocusWindow() + + self.xUITest.executeCommand(".uno:SelectAll") + + self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog") + xDialog = self.xUITest.getTopFocusWindow() + + xselectwords = xDialog.getChild("selectwords") + xdocwords = xDialog.getChild("docwords") + xselectchars = xDialog.getChild("selectchars") + xdocchars = xDialog.getChild("docchars") + xselectcharsnospaces = xDialog.getChild("selectcharsnospaces") + xdoccharsnospaces = xDialog.getChild("doccharsnospaces") + xselectcjkchars = xDialog.getChild("selectcjkchars") + xdoccjkchars = xDialog.getChild("doccjkchars") + + self.assertEqual(get_state_as_dict(xselectwords)["Text"], "12") + self.assertEqual(get_state_as_dict(xdocwords)["Text"], "12") + self.assertEqual(get_state_as_dict(xselectchars)["Text"], "54") + self.assertEqual(get_state_as_dict(xdocchars)["Text"], "54") + + # Without the fix in place it would have failed with: AssertionError: '0' != '44' + self.assertEqual(get_state_as_dict(xselectcharsnospaces)["Text"], "44") + self.assertEqual(get_state_as_dict(xdoccharsnospaces)["Text"], "44") + self.assertEqual(get_state_as_dict(xselectcjkchars)["Text"], "0") + self.assertEqual(get_state_as_dict(xdoccjkchars)["Text"], "0") + xCloseBtn = xDialog.getChild("close") + self.ui_test.close_dialog_through_button(xCloseBtn) + + self.ui_test.close_doc() # vim: set shiftwidth=4 softtabstop=4 expandtab: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits