summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-01-31 12:22:14 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-01-31 15:03:30 +0000
commit4f841e9a28a6f5d7ae9d5226cbc98db3cb992eb1 (patch)
tree19b57ef2f97dec893aff8e47c6c70efe536ba8f0
parent3ac5bfec2f73c55e99c4410f7559db86b875a269 (diff)
uitest: remove wait_until_file_is_available
Introduced in 33a49a99c76ca1879dbb0202384aa939a6d44a75 "uitest: introduce wait_until_file_is_available" as a blind fix for https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91 It turned out the root problem was caused by another test and the fix is addressed in https://gerrit.libreoffice.org/c/core/+/146385 "uitest: Always change doc info setting back to false" Change-Id: I4b3d5e24e35a33de6c128dcbf2f144b4cf48a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146389 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/qa/uitest/calc_tests4/exportToPDF.py2
-rw-r--r--sc/qa/uitest/calc_tests4/saveToCSV.py2
-rw-r--r--sc/qa/uitest/calc_tests7/save_readonly_with_password.py4
-rw-r--r--sc/qa/uitest/calc_tests7/tdf150044.py2
-rw-r--r--sc/qa/uitest/calc_tests8/tdf144940.py2
-rwxr-xr-xsc/qa/uitest/calc_tests8/tdf147086.py2
-rw-r--r--sc/qa/uitest/conditional_format/tdf117899.py2
-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_tests2/tdf141297.py2
-rw-r--r--sw/qa/uitest/writer_tests/trackedChanges.py1
-rw-r--r--sw/qa/uitest/writer_tests3/save_readonly_with_password.py7
-rw-r--r--sw/qa/uitest/writer_tests4/exportToPDF.py2
-rw-r--r--sw/qa/uitest/writer_tests5/tdf145326.py2
-rw-r--r--sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py4
-rw-r--r--sw/qa/uitest/writer_tests7/tdf119661.py4
-rw-r--r--sw/qa/uitest/writer_tests7/tdf90401.py4
-rw-r--r--uitest/uitest/test.py8
18 files changed, 0 insertions, 56 deletions
diff --git a/sc/qa/uitest/calc_tests4/exportToPDF.py b/sc/qa/uitest/calc_tests4/exportToPDF.py
index a67b572e61d2..ef79a0ce7790 100644
--- a/sc/qa/uitest/calc_tests4/exportToPDF.py
+++ b/sc/qa/uitest/calc_tests4/exportToPDF.py
@@ -69,8 +69,6 @@ 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("Sheet1", document.DrawPages[0][0].String)
diff --git a/sc/qa/uitest/calc_tests4/saveToCSV.py b/sc/qa/uitest/calc_tests4/saveToCSV.py
index d3876f8174a6..09949b7d71e8 100644
--- a/sc/qa/uitest/calc_tests4/saveToCSV.py
+++ b/sc/qa/uitest/calc_tests4/saveToCSV.py
@@ -60,8 +60,6 @@ class saveToCSV(UITestCase):
xFormulas.executeAction("CLICK", tuple())
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with open(xFilePath, "r") as f:
lines = f.readlines()
self.assertEqual("1", lines[0].strip())
diff --git a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
index 02f125e3008f..311293815398 100644
--- a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
+++ b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
@@ -46,8 +46,6 @@ 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())
@@ -82,8 +80,6 @@ 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/sc/qa/uitest/calc_tests7/tdf150044.py b/sc/qa/uitest/calc_tests7/tdf150044.py
index 6f70eccc7921..ffa0077879ea 100644
--- a/sc/qa/uitest/calc_tests7/tdf150044.py
+++ b/sc/qa/uitest/calc_tests7/tdf150044.py
@@ -41,8 +41,6 @@ class save_shared_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.execute_dialog_through_command(".uno:Open", close_button="") as xOpenDialog:
# Open document
xFileName = xOpenDialog.getChild("file_name")
diff --git a/sc/qa/uitest/calc_tests8/tdf144940.py b/sc/qa/uitest/calc_tests8/tdf144940.py
index ab47384311ad..9e577bf72815 100644
--- a/sc/qa/uitest/calc_tests8/tdf144940.py
+++ b/sc/qa/uitest/calc_tests8/tdf144940.py
@@ -46,8 +46,6 @@ class tdf144940(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:
xPageStyles = document.StyleFamilies[1]
diff --git a/sc/qa/uitest/calc_tests8/tdf147086.py b/sc/qa/uitest/calc_tests8/tdf147086.py
index f594edb696f6..906f79075b59 100755
--- a/sc/qa/uitest/calc_tests8/tdf147086.py
+++ b/sc/qa/uitest/calc_tests8/tdf147086.py
@@ -44,8 +44,6 @@ class tdf147086(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())
diff --git a/sc/qa/uitest/conditional_format/tdf117899.py b/sc/qa/uitest/conditional_format/tdf117899.py
index 4176afc00278..81c270cc895f 100644
--- a/sc/qa/uitest/conditional_format/tdf117899.py
+++ b/sc/qa/uitest/conditional_format/tdf117899.py
@@ -56,8 +56,6 @@ class Tdf117899(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)):
# Without the fix in place, this test would have failed here
self.execute_conditional_format_manager_dialog()
diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py b/sd/qa/uitest/impress_tests/exportToPDF.py
index 72a8ac916a46..3621ad0fb8f5 100644
--- a/sd/qa/uitest/impress_tests/exportToPDF.py
+++ b/sd/qa/uitest/impress_tests/exportToPDF.py
@@ -71,8 +71,6 @@ 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 caca0126a8b8..485dedde10f4 100644
--- a/sd/qa/uitest/impress_tests/save_readonly_with_password.py
+++ b/sd/qa/uitest/impress_tests/save_readonly_with_password.py
@@ -51,8 +51,6 @@ 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())
@@ -92,8 +90,6 @@ 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_tests2/tdf141297.py b/sd/qa/uitest/impress_tests2/tdf141297.py
index c7a9e3057e2c..bd776253e7a2 100644
--- a/sd/qa/uitest/impress_tests2/tdf141297.py
+++ b/sd/qa/uitest/impress_tests2/tdf141297.py
@@ -65,8 +65,6 @@ 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")
diff --git a/sw/qa/uitest/writer_tests/trackedChanges.py b/sw/qa/uitest/writer_tests/trackedChanges.py
index 592c839fcd18..0599f8bc6f11 100644
--- a/sw/qa/uitest/writer_tests/trackedChanges.py
+++ b/sw/qa/uitest/writer_tests/trackedChanges.py
@@ -418,7 +418,6 @@ class trackedchanges(UITestCase):
xFileTypeCombo = xSaveDialog.getChild("file_type")
select_by_text(xFileTypeCombo, "ODF Text Document (.odt)")
- self.ui_test.wait_until_file_is_available(xFilePath)
# load the temporary file, and check ODF roundtrip of the tracked deletion in a tracked insertion
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
# check tracked deletion in tracked insertion
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 46fa527d6d90..a19e97afc6de 100644
--- a/sw/qa/uitest/writer_tests3/save_readonly_with_password.py
+++ b/sw/qa/uitest/writer_tests3/save_readonly_with_password.py
@@ -48,11 +48,6 @@ class save_readonly_with_password(UITestCase):
with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="save"):
pass
- win = self.xUITest.getTopFocusWindow()
- print(get_state_as_dict(win))
- print(win.getChildren())
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document:
self.assertTrue(document.isReadonly())
@@ -88,8 +83,6 @@ 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/sw/qa/uitest/writer_tests4/exportToPDF.py b/sw/qa/uitest/writer_tests4/exportToPDF.py
index 99e20c914efb..f18aecca8cc9 100644
--- a/sw/qa/uitest/writer_tests4/exportToPDF.py
+++ b/sw/qa/uitest/writer_tests4/exportToPDF.py
@@ -67,8 +67,6 @@ 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("Hello World", document.DrawPages[0].getByIndex(0).String)
diff --git a/sw/qa/uitest/writer_tests5/tdf145326.py b/sw/qa/uitest/writer_tests5/tdf145326.py
index d063e6388aaa..7df98e825d17 100644
--- a/sw/qa/uitest/writer_tests5/tdf145326.py
+++ b/sw/qa/uitest/writer_tests5/tdf145326.py
@@ -58,8 +58,6 @@ class Tdf145326(UITestCase):
self.ui_test.close_doc()
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as doc2:
self.xUITest.executeCommand(".uno:LinkDialog")
diff --git a/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py b/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py
index 0df0dc504dde..992b564adbe4 100644
--- a/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py
+++ b/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py
@@ -56,8 +56,6 @@ class edit_file_properties_before_saving(UITestCase):
# Put this setting back to false, otherwise it might affect other tests
self.change_doc_info_setting("false")
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as doc2:
# Without the fix in place, this test would have failed here
self.assertTrue(doc2.isReadonly())
@@ -96,8 +94,6 @@ class edit_file_properties_before_saving(UITestCase):
# Put this setting back to false, otherwise it might affect other tests
self.change_doc_info_setting("false")
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as doc2:
self.assertTrue(doc2.isReadonly())
diff --git a/sw/qa/uitest/writer_tests7/tdf119661.py b/sw/qa/uitest/writer_tests7/tdf119661.py
index 689410f64a4b..47738bacadec 100644
--- a/sw/qa/uitest/writer_tests7/tdf119661.py
+++ b/sw/qa/uitest/writer_tests7/tdf119661.py
@@ -54,8 +54,6 @@ class tdf119661(UITestCase):
args=("CLICK", tuple()), close_button="yes"):
pass
-
-
# Save Copy as
with self.ui_test.execute_dialog_through_command(".uno:SaveAs", close_button="open") as xDialog:
@@ -64,8 +62,6 @@ class tdf119661(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:LinkDialog")
diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py b/sw/qa/uitest/writer_tests7/tdf90401.py
index fbc7afc0022b..15c1f3c31c12 100644
--- a/sw/qa/uitest/writer_tests7/tdf90401.py
+++ b/sw/qa/uitest/writer_tests7/tdf90401.py
@@ -60,8 +60,6 @@ class tdf90401(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 writer_doc2:
# check removed personal info on comments
@@ -130,8 +128,6 @@ class tdf90401(UITestCase):
with self.ui_test.execute_dialog_through_action(xOpen, "CLICK", close_button="save"):
pass
- self.ui_test.wait_until_file_is_available(xFilePath)
-
with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as writer_doc2:
# check removed personal info on comments
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 5ed20add799c..b718c84bee5e 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -7,7 +7,6 @@
import time
import threading
-import os.path
from contextlib import contextmanager
from uitest.uihelper.common import get_state_as_dict
@@ -65,13 +64,6 @@ class UITest(object):
else:
time.sleep(DEFAULT_SLEEP)
- def wait_until_file_is_available(self, fileName):
- while True:
- if os.path.isfile(fileName):
- return
- else:
- time.sleep(DEFAULT_SLEEP)
-
@contextmanager
def wait_until_component_loaded(self):
with EventListener(self._xContext, "OnLoad") as event: