Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d8b376ad
Kaydet (Commit)
d8b376ad
authored
Haz 22, 2016
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: convert all calc demos to the unittest based approach
Change-Id: I6ad7898f92c74f37ed2936337d6570904860d535
üst
4fa28812
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
47 deletions
+78
-47
calc_demo.txt
uitest/calc_tests/calc_demo.txt
+0
-4
create_range_name.py
uitest/calc_tests/create_range_name.py
+13
-17
function_wizard.py
uitest/calc_tests/function_wizard.py
+9
-11
gridwin.py
uitest/calc_tests/gridwin.py
+45
-0
gridwindow.py
uitest/calc_tests/gridwindow.py
+11
-15
No files found.
uitest/calc_tests/calc_demo.txt
deleted
100644 → 0
Dosyayı görüntüle @
4fa28812
calc_tests.create_range_name.create_range_name
calc_tests.create_range_name.create_local_range_name
calc_tests.function_wizard.open_function_wizard
calc_tests.gridwindow.input
uitest/calc_tests/create_range_name.py
Dosyayı görüntüle @
d8b376ad
...
...
@@ -9,6 +9,8 @@ from uitest_helper import UITest
from
helper
import
mkPropertyValues
from
UITestCase
import
UITestCase
try
:
import
pyuno
import
uno
...
...
@@ -19,17 +21,15 @@ except ImportError:
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
def
create_range_name
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
class
CreateRangeNameTest
(
UITestCase
):
ui_test
=
UITest
(
xUITest
,
xContext
)
def
test_create_range_name
(
self
):
ui_test
.
create_doc_in_start_center
(
"calc"
)
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
ui_test
.
execute_modeless_dialog_through_command
(
".uno:AddName"
)
self
.
ui_test
.
execute_modeless_dialog_through_command
(
".uno:AddName"
)
xAddNameDlg
=
xUITest
.
getTopFocusWindow
()
xAddNameDlg
=
self
.
xUITest
.
getTopFocusWindow
()
props
=
{
"TEXT"
:
"simpleRangeName"
}
actionProps
=
mkPropertyValues
(
props
)
...
...
@@ -39,19 +39,15 @@ def create_range_name(xContext):
xAddBtn
=
xAddNameDlg
.
getChild
(
"add"
)
xAddBtn
.
executeAction
(
"CLICK"
,
tuple
())
ui_test
.
close_doc
()
def
create_local_range_name
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
self
.
ui_test
.
close_doc
()
ui_test
=
UITest
(
xUITest
,
xContext
)
def
test_create_local_range_name
(
self
):
ui_test
.
create_doc_in_start_center
(
"calc"
)
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
ui_test
.
execute_modeless_dialog_through_command
(
".uno:AddName"
)
self
.
ui_test
.
execute_modeless_dialog_through_command
(
".uno:AddName"
)
xAddNameDlg
=
xUITest
.
getTopFocusWindow
()
xAddNameDlg
=
self
.
xUITest
.
getTopFocusWindow
()
props
=
{
"TEXT"
:
"simpleRangeName"
}
actionProps
=
mkPropertyValues
(
props
)
...
...
@@ -67,6 +63,6 @@ def create_local_range_name(xContext):
xAddBtn
=
xAddNameDlg
.
getChild
(
"add"
)
xAddBtn
.
executeAction
(
"CLICK"
,
tuple
())
ui_test
.
close_doc
()
self
.
ui_test
.
close_doc
()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
uitest/calc_tests/function_wizard.py
Dosyayı görüntüle @
d8b376ad
...
...
@@ -10,6 +10,8 @@ from uitest_helper import UITest
from
helper
import
mkPropertyValues
import
time
from
UITestCase
import
UITestCase
try
:
import
pyuno
import
uno
...
...
@@ -20,18 +22,14 @@ except ImportError:
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
# tdf#98427
def
open_function_wizard
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
ui_test
=
UITest
(
xUITest
,
xContext
)
ui_test
.
create_doc_in_start_center
(
"calc"
)
class
FunctionWizardTest
(
UITestCase
):
# tdf#98427
def
test_open_function_wizard
(
self
):
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
ui_test
.
execute_modeless_dialog_through_command
(
".uno:FunctionDialog"
)
self
.
ui_test
.
execute_modeless_dialog_through_command
(
".uno:FunctionDialog"
)
xFunctionDlg
=
xUITest
.
getTopFocusWindow
()
xFunctionDlg
=
self
.
xUITest
.
getTopFocusWindow
()
xArrayChkBox
=
xFunctionDlg
.
getChild
(
"array"
)
xArrayChkBox
.
executeAction
(
"CLICK"
,
tuple
())
...
...
@@ -39,6 +37,6 @@ def open_function_wizard(xContext):
xCancelBtn
=
xFunctionDlg
.
getChild
(
"cancel"
)
xCancelBtn
.
executeAction
(
"CLICK"
,
tuple
())
ui_test
.
close_doc
()
self
.
ui_test
.
close_doc
()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
uitest/calc_tests/gridwin.py
0 → 100644
Dosyayı görüntüle @
d8b376ad
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# 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_helper
import
UITest
from
helper
import
mkPropertyValues
from
UITestCase
import
UITestCase
import
time
try
:
import
pyuno
import
uno
import
unohelper
except
ImportError
:
print
(
"pyuno not found: try to set PYTHONPATH and URE_BOOTSTRAP variables"
)
print
(
"PYTHONPATH=/installation/opt/program"
)
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
class
GridWinTest
(
UITestCase
):
def
test_select_object
(
self
):
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
xCalcDoc
=
self
.
xUITest
.
getTopFocusWindow
()
xGridWindow
=
xCalcDoc
.
getChild
(
"grid_window"
)
selectProps
=
mkPropertyValues
({
"CELL"
:
"B10"
})
xGridWindow
.
executeAction
(
"SELECT"
,
selectProps
)
xGridWindow
.
executeAction
(
"SELECT"
,
mkPropertyValues
({
"OBJECT"
:
"Object 1"
}))
xGridWindow
.
executeAction
(
"ACTIVATE"
,
tuple
())
xGridWindow
.
executeAction
(
"DESELECT"
,
tuple
())
self
.
ui_test
.
close_doc
()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
uitest/calc_tests/gridwindow.py
Dosyayı görüntüle @
d8b376ad
...
...
@@ -11,6 +11,8 @@ from helper import mkPropertyValues
from
uihelper.calc
import
enter_text_to_cell
from
UITestCase
import
UITestCase
import
time
try
:
...
...
@@ -23,14 +25,12 @@ except ImportError:
print
(
"URE_BOOTSTRAP=file:///installation/opt/program/fundamentalrc"
)
raise
def
input
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
class
GridWindowTest
(
UITestCase
):
ui_test
=
UITest
(
xUITest
,
xContext
)
def
test_input
(
self
):
ui_test
.
create_doc_in_start_center
(
"calc"
)
xTopWindow
=
xUITest
.
getTopFocusWindow
()
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
xTopWindow
=
self
.
xUITest
.
getTopFocusWindow
()
xGridWindow
=
xTopWindow
.
getChild
(
"grid_window"
)
...
...
@@ -39,16 +39,12 @@ def input(xContext):
time
.
sleep
(
2
)
ui_test
.
close_doc
()
def
special_keys
(
xContext
):
xUITest
=
xContext
.
ServiceManager
.
createInstanceWithContext
(
"org.libreoffice.uitest.UITest"
,
xContext
)
self
.
ui_test
.
close_doc
()
ui_test
=
UITest
(
xUITest
,
xContext
)
def
test_special_keys
(
self
):
ui_test
.
create_doc_in_start_center
(
"calc"
)
xTopWindow
=
xUITest
.
getTopFocusWindow
()
self
.
ui_test
.
create_doc_in_start_center
(
"calc"
)
xTopWindow
=
self
.
xUITest
.
getTopFocusWindow
()
xGridWindow
=
xTopWindow
.
getChild
(
"grid_window"
)
...
...
@@ -60,6 +56,6 @@ def special_keys(xContext):
time
.
sleep
(
2
)
ui_test
.
close_doc
()
self
.
ui_test
.
close_doc
()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment