summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-02-25 13:01:22 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-02-25 15:29:54 +0100
commit33a49a99c76ca1879dbb0202384aa939a6d44a75 (patch)
tree7a49e7eb2f1a25af9d679b6c711573484c244fa2 /sd
parenta24eac37fbf8a325b09c3b575c568621a696a560 (diff)
uitest: introduce wait_until_file_is_available
For export - import tests See https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91 Change-Id: I3c2537a43cc69067355f18162d6463e268420090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130530 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/uitest/impress_tests/exportToPDF.py2
-rw-r--r--sd/qa/uitest/impress_tests/save_readonly_with_password.py4
-rw-r--r--sd/qa/uitest/impress_tests/tdf141297.py2
3 files changed, 8 insertions, 0 deletions
diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py b/sd/qa/uitest/impress_tests/exportToPDF.py
index aa766741e3e3..4dcaa4954405 100644
--- a/sd/qa/uitest/impress_tests/exportToPDF.py
+++ b/sd/qa/uitest/impress_tests/exportToPDF.py
@@ -70,6 +70,8 @@ class exportToPDF(UITestCase):
xFileName.executeAction('TYPE', mkPropertyValues({'KEYCODE':'BACKSPACE'}))
xFileName.executeAction('TYPE', mkPropertyValues({'TEXT': xFilePath}))
+ self.ui_test.wait_until_file_is_available(xFilePath)
+
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
self.assertEqual("", document.DrawPages[0].getByIndex(0).String)
diff --git a/sd/qa/uitest/impress_tests/save_readonly_with_password.py b/sd/qa/uitest/impress_tests/save_readonly_with_password.py
index 485dedde10f4..caca0126a8b8 100644
--- a/sd/qa/uitest/impress_tests/save_readonly_with_password.py
+++ b/sd/qa/uitest/impress_tests/save_readonly_with_password.py
@@ -51,6 +51,8 @@ class save_readonly_with_password(UITestCase):
with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="save"):
pass
+ self.ui_test.wait_until_file_is_available(xFilePath)
+
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
self.assertTrue(document.isReadonly())
@@ -90,6 +92,8 @@ class save_readonly_with_password(UITestCase):
xConfirmPassword = xPasswordDialog.getChild("confirmropassEntry")
xConfirmPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"}))
+ self.ui_test.wait_until_file_is_available(xFilePath)
+
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
self.assertTrue(document.isReadonly())
diff --git a/sd/qa/uitest/impress_tests/tdf141297.py b/sd/qa/uitest/impress_tests/tdf141297.py
index bd776253e7a2..c7a9e3057e2c 100644
--- a/sd/qa/uitest/impress_tests/tdf141297.py
+++ b/sd/qa/uitest/impress_tests/tdf141297.py
@@ -65,6 +65,8 @@ class tdf141297(UITestCase):
xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+ self.ui_test.wait_until_file_is_available(xFilePath)
+
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)):
self.xUITest.executeCommand(".uno:ManageLinks")