diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-25 13:01:22 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-25 15:29:54 +0100 |
commit | 33a49a99c76ca1879dbb0202384aa939a6d44a75 (patch) | |
tree | 7a49e7eb2f1a25af9d679b6c711573484c244fa2 /sc | |
parent | a24eac37fbf8a325b09c3b575c568621a696a560 (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 'sc')
-rw-r--r-- | sc/qa/uitest/calc_tests4/exportToPDF.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests4/saveToCSV.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests7/save_readonly_with_password.py | 4 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests8/tdf144940.py | 2 | ||||
-rwxr-xr-x | sc/qa/uitest/calc_tests8/tdf147086.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/conditional_format/tdf117899.py | 2 |
6 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests4/exportToPDF.py b/sc/qa/uitest/calc_tests4/exportToPDF.py index 1e88659f1193..3cf589bbb9c3 100644 --- a/sc/qa/uitest/calc_tests4/exportToPDF.py +++ b/sc/qa/uitest/calc_tests4/exportToPDF.py @@ -67,6 +67,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("Sheet1", document.DrawPages[0].getByIndex(0).String) diff --git a/sc/qa/uitest/calc_tests4/saveToCSV.py b/sc/qa/uitest/calc_tests4/saveToCSV.py index 8ed168c9af3d..503c7ed2386a 100644 --- a/sc/qa/uitest/calc_tests4/saveToCSV.py +++ b/sc/qa/uitest/calc_tests4/saveToCSV.py @@ -59,6 +59,8 @@ 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 311293815398..02f125e3008f 100644 --- a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py +++ b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py @@ -46,6 +46,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()) @@ -80,6 +82,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/sc/qa/uitest/calc_tests8/tdf144940.py b/sc/qa/uitest/calc_tests8/tdf144940.py index c61967ebf970..b117b56d2a9b 100644 --- a/sc/qa/uitest/calc_tests8/tdf144940.py +++ b/sc/qa/uitest/calc_tests8/tdf144940.py @@ -46,6 +46,8 @@ 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.getByIndex(1) diff --git a/sc/qa/uitest/calc_tests8/tdf147086.py b/sc/qa/uitest/calc_tests8/tdf147086.py index 906f79075b59..f594edb696f6 100755 --- a/sc/qa/uitest/calc_tests8/tdf147086.py +++ b/sc/qa/uitest/calc_tests8/tdf147086.py @@ -44,6 +44,8 @@ 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 04e4da9e46a9..0498a05b63ef 100644 --- a/sc/qa/uitest/conditional_format/tdf117899.py +++ b/sc/qa/uitest/conditional_format/tdf117899.py @@ -54,6 +54,8 @@ 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)): xCalcDoc = self.xUITest.getTopFocusWindow() |