summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@nokia.com>2011-11-16 09:30:51 +0100
committerChristian Stenger <christian.stenger@nokia.com>2011-11-17 08:44:39 +0100
commit54d5059ec02f6dd20e2701d0f51865239b13f832 (patch)
tree7ba7a74ff76b5aee6ce67401be5e09c1783fce0e
parentb2987e3c2d683f40ec3bc5b613264ee95e65e347 (diff)
downloadqt-creator-54d5059ec02f6dd20e2701d0f51865239b13f832.tar.gz
Squish: Small fix and improvement for indent test
Change-Id: Ib34050986433bf9010da2e8cf71fe6651559c015 Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
-rw-r--r--tests/system/suite_qtquick/tst_qml_indent/test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/system/suite_qtquick/tst_qml_indent/test.py b/tests/system/suite_qtquick/tst_qml_indent/test.py
index ef7a8a0cec..1fd686bb33 100644
--- a/tests/system/suite_qtquick/tst_qml_indent/test.py
+++ b/tests/system/suite_qtquick/tst_qml_indent/test.py
@@ -43,11 +43,10 @@ def prepareQmlFile():
originalText = "%s" % editor.plainText
indented = editor.plainText
unindented = ""
- lines = str(indented).split("\n")
+ lines = str(indented).splitlines()
test.log("Using %d lines..." % len(lines))
for line in lines:
unindented += line.lstrip()+"\n"
- unindented=unindented[0:-1]
editor.plainText = unindented
return True
@@ -63,11 +62,13 @@ def testReIndent():
"window=':Qt Creator_Core::Internal::MainWindow'}")
type(editor, "<Ctrl+A>")
test.log("calling re-indent")
+ starttime = datetime.utcnow()
type(editor, "<Ctrl+I>")
- waitFor("textHasChanged==True", 20000)
+ waitFor("textHasChanged==True", 25000)
+ endtime = datetime.utcnow()
textAfterReIndent = "%s" % editor.plainText
if originalText==textAfterReIndent:
- test.passes("Text successfully reindented...")
+ test.passes("Text successfully re-indented within %d seconds" % (endtime-starttime).seconds)
else:
# shrink the texts - it's huge output that takes long time to finish & screenshot is taken as well
originalText = shrinkText(originalText, 20)