sw/qa/uitest/writer_tests3/pageNumber.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
New commits: commit 745bd97e9f07cb3ad2aeb8ac0124a45d83ab7c85 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Sep 12 14:39:43 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 12 16:47:02 2025 +0200 tdf#165852: sw: Add UItest Change-Id: Id37e3fa13bcdcbb6c7036e531d3bb297b7d44321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190876 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sw/qa/uitest/writer_tests3/pageNumber.py b/sw/qa/uitest/writer_tests3/pageNumber.py index b4da3078f348..9efc4af13924 100644 --- a/sw/qa/uitest/writer_tests3/pageNumber.py +++ b/sw/qa/uitest/writer_tests3/pageNumber.py @@ -60,4 +60,33 @@ class PageNumberWizard(UITestCase): self.assertIsNotNone(document.StyleFamilies.PageStyles.Standard.HeaderText) self.assertIsNotNone(document.StyleFamilies.PageStyles.Standard.FooterText) + def test_tdf165852(self): + with self.ui_test.create_doc_in_start_center("writer") as document: + + xWriterDoc = self.xUITest.getTopFocusWindow() + xWriterEdit = xWriterDoc.getChild("writer_edit") + self.xUITest.executeCommand(".uno:InsertPagebreak") + self.assertEqual("2", get_state_as_dict(xWriterEdit)["Pages"]) + + with self.ui_test.execute_dialog_through_command(".uno:PageNumberWizard") as xDialog: + xPositionCombo = xDialog.getChild("positionCombo") + self.assertEqual("Bottom of page (Footer)", get_state_as_dict(xPositionCombo)["SelectEntryText"]) + + xAlignmentCombo = xDialog.getChild("alignmentCombo") + select_by_text(xAlignmentCombo, "Right") + self.assertEqual("Right", get_state_as_dict(xAlignmentCombo)["SelectEntryText"]) + + xMirrorCheckbox = xDialog.getChild("mirrorCheckbox") + self.assertEqual("true", get_state_as_dict(xMirrorCheckbox)["Selected"]) + + xStandardStyle = document.StyleFamilies.PageStyles.Standard + self.assertIsNone(xStandardStyle.HeaderText) + + # Without the fix in place, this test would have failed with + # AssertionError: '1' != '' + self.assertEqual("1", xStandardStyle.FooterText.String) + self.assertEqual("1", xStandardStyle.FooterTextFirst.String) + self.assertEqual("2", xStandardStyle.FooterTextLeft.String) + self.assertEqual("1", xStandardStyle.FooterTextRight.String) + # vim: set shiftwidth=4 softtabstop=4 expandtab: