summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/goalSeek
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-01-13 16:35:28 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-14 08:34:22 +0100
commit4418f099661033702b8fb94572bd0a1bfecbd55b (patch)
tree0e72de688943b0ed01ad51340dd31a6288ab7c3c /sc/qa/uitest/goalSeek
parent0918eade90e19dd8e9a246446dcb9463c6c7f7cc (diff)
uitest: sc: factor out common code ( part 2 )
Change-Id: Ia2a707f1df513e067c8e34b263ad336fed6d14dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109235 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/goalSeek')
-rw-r--r--sc/qa/uitest/goalSeek/goalSeek.py9
-rw-r--r--sc/qa/uitest/goalSeek/tdf37341.py7
-rw-r--r--sc/qa/uitest/goalSeek/tdf43693.py7
3 files changed, 3 insertions, 20 deletions
diff --git a/sc/qa/uitest/goalSeek/goalSeek.py b/sc/qa/uitest/goalSeek/goalSeek.py
index 59d8b894009d..e7be69fb0ff5 100644
--- a/sc/qa/uitest/goalSeek/goalSeek.py
+++ b/sc/qa/uitest/goalSeek/goalSeek.py
@@ -5,18 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import select_pos
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
-import org.libreoffice.unotest
-import pathlib
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
-
class goalSeek(UITestCase):
def test_goalSeek(self):
diff --git a/sc/qa/uitest/goalSeek/tdf37341.py b/sc/qa/uitest/goalSeek/tdf37341.py
index 730c3482e296..7df5ef6feaba 100644
--- a/sc/qa/uitest/goalSeek/tdf37341.py
+++ b/sc/qa/uitest/goalSeek/tdf37341.py
@@ -5,16 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import select_pos
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-import org.libreoffice.unotest
-import pathlib
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
#Bug 37341 - Goal Seek hangs indefinitely for too many calculation steps (Formula Cell $F$110)
diff --git a/sc/qa/uitest/goalSeek/tdf43693.py b/sc/qa/uitest/goalSeek/tdf43693.py
index ade370e2b8fa..7b1cd9643c1a 100644
--- a/sc/qa/uitest/goalSeek/tdf43693.py
+++ b/sc/qa/uitest/goalSeek/tdf43693.py
@@ -5,16 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import select_pos
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-import org.libreoffice.unotest
-import pathlib
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
#Bug 43693 - Goal Seek: reproducible crash using "target value search"