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
bfa6aab3
Kaydet (Commit)
bfa6aab3
authored
Nis 29, 2013
tarafından
David Ostrovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix refresh() call
Change-Id: Id7cb705b2b719cdd3bf16b8aba858c0319686599
üst
61dc0d2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
var_fields.py
sw/qa/python/var_fields.py
+4
-14
No files found.
sw/qa/python/var_fields.py
Dosyayı görüntüle @
bfa6aab3
...
...
@@ -23,16 +23,6 @@ class TestVarFields(unittest.TestCase):
Note: this test was migrated from java (the steps numbering too)
sw/qa/complex/writer/VarFields.java
TODO:
Unlike in java, this test doesn't overwrite the field condition.
Apparently xDoc.refresh() is somehow broken (from python), because doing the update
manually does overwrite the condition:
1. run the python test with make verbose=t PythonTest_sw_python
2. open created document with
./install/program/soffice.bin workdir/unxlngx6.pro/PythonTest/sw_python/VarFields.odt
3. check that TextSection's condition still has the right value: "foo EQ 1"
4. Update field with Tool=>Update=>Fields (or [F9])
5. check that TextSection's condition was overriden: "0"
"""
xDoc
=
self
.
__class__
.
_xDoc
xBodyText
=
xDoc
.
getText
()
...
...
@@ -86,7 +76,7 @@ class TestVarFields(unittest.TestCase):
# 13. Access fields to refresh the document
xEnumerationAccess
=
xDoc
.
getTextFields
()
# 14. refresh document to update the fields
x
Doc
.
refresh
()
x
EnumerationAccess
.
refresh
()
# 15. retrieve the field
xFieldEnum
=
xEnumerationAccess
.
createEnumeration
()
# Note: we have only one field here, that why nextElement() is just fine here
...
...
@@ -105,7 +95,7 @@ class TestVarFields(unittest.TestCase):
self
)
# 17. refresh document to update the fields again
x
Doc
.
refresh
()
x
EnumerationAccess
.
refresh
()
# 18. store document
url
=
os
.
path
.
join
(
os
.
environ
[
"TestUserDir"
],
"VarFields.odt"
)
xDoc
.
storeToURL
(
url
,
tuple
(
list
(
range
(
0
))))
...
...
@@ -115,9 +105,9 @@ class TestVarFields(unittest.TestCase):
readContent
=
xPropSet
.
getPropertyValue
(
"Condition"
)
# 21. check
# expected:
self
.
assertEqual
(
"foo EQ 1"
,
readContent
)
#
self.assertEqual("foo EQ 1", readContent)
# reality:
#
self.assertEqual("0", readContent)
self
.
assertEqual
(
"0"
,
readContent
)
if
__name__
==
'__main__'
:
unittest
.
main
()
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