Commit e2c156b4 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Fix tst_git_clone

Change-Id: I9ee7bfb01d2618f426450182552cec0263af02ec
Reviewed-by: default avatarRobert Loehning <>
parent 4b232e56
......@@ -36,7 +36,7 @@ def verifyCloneLog(targetDir, canceled):
# Expect fails because of QTCREATORBUG-10531
cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit")
finish = findObject(":Git Repository Clone.Finish_QPushButton")
waitFor("finish.enabled", 30000)
waitFor("canceled or finish.enabled", 30000)
test.xverify(("Executing in " + targetDir + ":" in str(cloneLog.plainText)),
"Searching for target directory in clone log")
test.xverify((" ".join(["clone", cloneUrl, cloneDir]) in str(cloneLog.plainText)),
......@@ -58,7 +58,9 @@ def verifyCloneLog(targetDir, canceled):
test.xverify((result in str(cloneLog.plainText)),
"Searching for result (%s) in clone log:\n%s"
% (result, str(cloneLog.plainText).replace(unicode("\x1b"), "")))":Git Repository Clone.Result._QLabel").text, summary)
resultLabel = findObject(":Git Repository Clone.Result._QLabel")
test.verify(waitFor('str(resultLabel.text) == summary', 3000),
"Verifying expected result (%s)" % summary)
def verifyFiles(targetDir):
for file in [".gitignore", "CMakeLists.txt", "",
......@@ -84,9 +86,12 @@ def main():, "p-qt-labs-jom")
replaceEditorContent(cloneDirEdit, cloneDir)
cloneLog = findObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit")":Git Repository Clone.Result._QLabel").text,
"Cloning started...")
if button == "Cancel immediately":
# wait for cloning to have started
waitFor('len(str(cloneLog.plainText)) > 20 + len(cloneDir)')
clickButton(":Git Repository Clone.Cancel_QPushButton")
verifyCloneLog(targetDir, True)
clickButton(":Git Repository Clone.Cancel_QPushButton")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment