summaryrefslogtreecommitdiff
path: root/sw/qa/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest')
-rw-r--r--sw/qa/uitest/data/tdf157569.docxbin12158 -> 12536 bytes
-rw-r--r--sw/qa/uitest/options/optionsDialog.py1
-rw-r--r--sw/qa/uitest/styleInspector/styleInspector.py20
-rw-r--r--sw/qa/uitest/styleInspector/tdf137513.py2
-rw-r--r--sw/qa/uitest/writer_tests/trackedChanges.py2
-rw-r--r--sw/qa/uitest/writer_tests3/save_readonly_with_password.py2
-rw-r--r--sw/qa/uitest/writer_tests5/tdf163325.py1
-rw-r--r--sw/qa/uitest/writer_tests6/tdf157569.py2
-rw-r--r--sw/qa/uitest/writer_tests7/tdf90401.py2
-rw-r--r--sw/qa/uitest/writer_tests8/tdf158794.py37
10 files changed, 53 insertions, 16 deletions
diff --git a/sw/qa/uitest/data/tdf157569.docx b/sw/qa/uitest/data/tdf157569.docx
index 2143a831a0dd..a10c05e07652 100644
--- a/sw/qa/uitest/data/tdf157569.docx
+++ b/sw/qa/uitest/data/tdf157569.docx
Binary files differ
diff --git a/sw/qa/uitest/options/optionsDialog.py b/sw/qa/uitest/options/optionsDialog.py
index 48c1d5d5bc6c..b59180c53c2a 100644
--- a/sw/qa/uitest/options/optionsDialog.py
+++ b/sw/qa/uitest/options/optionsDialog.py
@@ -61,6 +61,7 @@ class optionsDialog(UITestCase):
xOptimal = xDialog.getChild("zoomoptimal")
self.assertEqual(get_state_as_dict(xOptimal)['Visible'], "true")
xApplyBtn = xDialog.getChild("apply")
+ self.assertIsNotNone(xApplyBtn)
def test_tdf132274Web(self):
with self.ui_test.create_doc_in_start_center("writer"):
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py b/sw/qa/uitest/styleInspector/styleInspector.py
index e4fe8e0259c7..2dc13d93cc48 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -26,7 +26,7 @@ class styleNavigator(UITestCase):
# The cursor is on text without formatting and default style
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
self.assertEqual(0, len(xListBox.getChild('3').getChildren()))
@@ -36,7 +36,7 @@ class styleNavigator(UITestCase):
# The cursor is on text with direct formatting
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
@@ -54,7 +54,7 @@ class styleNavigator(UITestCase):
# The cursor is on text with paragraph direct formatting
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
xParDirFormatting = xListBox.getChild('1')
self.assertEqual(7, len(xParDirFormatting.getChildren()))
@@ -75,7 +75,7 @@ class styleNavigator(UITestCase):
xParStyle = xListBox.getChild('0')
self.assertEqual(3, len(xParStyle.getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xParStyle.getChild('0'))['Text'])
- self.assertEqual(143, len(xParStyle.getChild('0').getChildren()))
+ self.assertEqual(144, len(xParStyle.getChild('0').getChildren()))
self.assertEqual("Heading\t", get_state_as_dict(xParStyle.getChild('1'))['Text'])
self.assertEqual(28, len(xParStyle.getChild('1').getChildren()))
@@ -109,7 +109,7 @@ class styleNavigator(UITestCase):
xParStyle = xListBox.getChild('0')
self.assertEqual(3, len(xParStyle.getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xParStyle.getChild('0'))['Text'])
- self.assertEqual(143, len(xParStyle.getChild('0').getChildren()))
+ self.assertEqual(144, len(xParStyle.getChild('0').getChildren()))
self.assertEqual("Body Text\t", get_state_as_dict(xParStyle.getChild('1'))['Text'])
self.assertEqual(6, len(xParStyle.getChild('1').getChildren()))
@@ -144,7 +144,7 @@ class styleNavigator(UITestCase):
# The cursor is on text without metadata
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
self.assertEqual(0, len(xListBox.getChild('3').getChildren()))
@@ -154,7 +154,7 @@ class styleNavigator(UITestCase):
# The cursor is on text with paragraph metadata showed under direct paragraph formatting
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
xParDirFormatting = xListBox.getChild('1')
self.assertEqual(1, len(xParDirFormatting.getChildren()))
@@ -207,7 +207,7 @@ class styleNavigator(UITestCase):
# The cursor is on text without metadata
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
self.assertEqual(0, len(xListBox.getChild('3').getChildren()))
@@ -217,7 +217,7 @@ class styleNavigator(UITestCase):
# The cursor is on text with paragraph metadata showed under direct paragraph formatting
self.assertEqual(1, len(xListBox.getChild('1').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('1').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('1').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('1').getChild('0').getChildren()))
# Outer bookmark
xBookmarkFormatting = xListBox.getChild('0')
@@ -264,7 +264,7 @@ class styleNavigator(UITestCase):
# The cursor is on text without metadata
self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
diff --git a/sw/qa/uitest/styleInspector/tdf137513.py b/sw/qa/uitest/styleInspector/tdf137513.py
index 936cb9400740..70f74c76a5e9 100644
--- a/sw/qa/uitest/styleInspector/tdf137513.py
+++ b/sw/qa/uitest/styleInspector/tdf137513.py
@@ -35,7 +35,7 @@ class tdf137513(UITestCase):
self.assertEqual(2, len(xListBox.getChild('0').getChildren()))
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
self.assertEqual("Table Contents\t", get_state_as_dict(xListBox.getChild('0').getChild('1'))['Text'])
- self.assertEqual(143, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(144, len(xListBox.getChild('0').getChild('0').getChildren()))
xTableContent = xListBox.getChild('0').getChild('1')
self.assertEqual(5, len(xTableContent.getChildren()))
diff --git a/sw/qa/uitest/writer_tests/trackedChanges.py b/sw/qa/uitest/writer_tests/trackedChanges.py
index a256889a8a8b..1e21a3a703ff 100644
--- a/sw/qa/uitest/writer_tests/trackedChanges.py
+++ b/sw/qa/uitest/writer_tests/trackedChanges.py
@@ -393,7 +393,7 @@ class trackedchanges(UITestCase):
xOpen = xDialog.getChild("open")
# DOC confirmation dialog is displayed
- with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="save"):
+ with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="btnYes"):
pass
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
diff --git a/sw/qa/uitest/writer_tests3/save_readonly_with_password.py b/sw/qa/uitest/writer_tests3/save_readonly_with_password.py
index f14b74046d0f..546d05357010 100644
--- a/sw/qa/uitest/writer_tests3/save_readonly_with_password.py
+++ b/sw/qa/uitest/writer_tests3/save_readonly_with_password.py
@@ -44,7 +44,7 @@ class save_readonly_with_password(UITestCase):
xOk = xPasswordDialog.getChild("ok")
# DOCX confirmation dialog is displayed
- with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="save"):
+ with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="btnYes"):
pass
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
diff --git a/sw/qa/uitest/writer_tests5/tdf163325.py b/sw/qa/uitest/writer_tests5/tdf163325.py
index fe6be3a04506..8e0606e0a319 100644
--- a/sw/qa/uitest/writer_tests5/tdf163325.py
+++ b/sw/qa/uitest/writer_tests5/tdf163325.py
@@ -7,7 +7,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-import org.libreoffice.unotest
from uitest.framework import UITestCase
from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict
diff --git a/sw/qa/uitest/writer_tests6/tdf157569.py b/sw/qa/uitest/writer_tests6/tdf157569.py
index 9177047cec51..79816d4e7d68 100644
--- a/sw/qa/uitest/writer_tests6/tdf157569.py
+++ b/sw/qa/uitest/writer_tests6/tdf157569.py
@@ -26,7 +26,7 @@ class tdf157569(UITestCase):
if platform.system() == "Windows":
self.assertEqual(2155, nWidth) # no idea why it's different on Windows
else:
- self.assertEqual(2118, nWidth)
+ self.assertEqual(2120, nWidth)
xDoc = self.xUITest.getTopFocusWindow()
xEditWin = xDoc.getChild("writer_edit")
diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py b/sw/qa/uitest/writer_tests7/tdf90401.py
index 6c29269a5880..f5f3661453b3 100644
--- a/sw/qa/uitest/writer_tests7/tdf90401.py
+++ b/sw/qa/uitest/writer_tests7/tdf90401.py
@@ -108,7 +108,7 @@ class tdf90401(UITestCase):
xOpen = xDialog.getChild("open")
# DOCX confirmation dialog is displayed
- with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="save"):
+ with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="btnYes"):
pass
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as writer_doc2:
diff --git a/sw/qa/uitest/writer_tests8/tdf158794.py b/sw/qa/uitest/writer_tests8/tdf158794.py
new file mode 100644
index 000000000000..fc9a6d36b01c
--- /dev/null
+++ b/sw/qa/uitest/writer_tests8/tdf158794.py
@@ -0,0 +1,37 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.calc import enter_text_to_cell
+
+class tdf158794(UITestCase):
+ def test_tdf158794(self):
+ with self.ui_test.create_doc_in_start_center("calc"):
+
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ enter_text_to_cell(gridwin, "A1", "1")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+
+ self.xUITest.executeCommand(".uno:Copy")
+
+ with self.ui_test.load_empty_file("writer") as document:
+
+ self.xUITest.executeCommand(".uno:InsertFootnote")
+
+ # Paste as DDE link
+ # Without the fix in place, this test would have crashed here
+ formatProperty = mkPropertyValues({"SelectedFormat": 59})
+ self.xUITest.executeCommandWithParameters(".uno:ClipboardFormatItems", formatProperty)
+
+ self.assertEqual("", document.Footnotes[0].String)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: