summaryrefslogtreecommitdiff
path: root/sw/qa/python/var_fields.py
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2013-04-30 00:01:06 +0200
committerDavid Ostrovsky <david@ostrovsky.org>2013-04-30 00:01:06 +0200
commitbfa6aab3992dfca2312ffd626d975b25f84544fe (patch)
tree4e404961668031b3049334850e443b12fb5d7e0b /sw/qa/python/var_fields.py
parent61dc0d2c9d79fd9ce32cd9591fad4daead0ebade (diff)
fix refresh() call
Change-Id: Id7cb705b2b719cdd3bf16b8aba858c0319686599
Diffstat (limited to 'sw/qa/python/var_fields.py')
-rw-r--r--sw/qa/python/var_fields.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/sw/qa/python/var_fields.py b/sw/qa/python/var_fields.py
index 1a8a801c2cb6..3222f179eaba 100644
--- a/sw/qa/python/var_fields.py
+++ b/sw/qa/python/var_fields.py
@@ -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
- xDoc.refresh()
+ xEnumerationAccess.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
- xDoc.refresh()
+ xEnumerationAccess.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()