test.py 940 Bytes
Newer Older
1 2 3 4 5 6 7
source("../../shared/qtcreator.py")

projectsPath = tempDir()
project = "SquishProject"

def main():
    startApplication("qtcreator" + SettingsPath)
8
    createProject_Qt_GUI(projectsPath, project, defaultQtVersion, True)
9 10
    clickButton(verifyEnabled(":*Qt Creator.Run_Core::Internal::FancyToolButton"))
    waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
11
    playButton = verifyEnabled(":Qt Creator.ReRun_QToolButton", False)
12 13 14 15 16 17 18 19 20 21 22 23 24
    stopButton = verifyEnabled(":Qt Creator.Stop_QToolButton")
    clickButton(stopButton)
    test.verify(playButton.enabled)
    test.compare(stopButton.enabled, False)
    sendEvent("QCloseEvent", waitForObject(":Qt Creator_Core::Internal::MainWindow"))
    waitForCleanShutdown()

def init():
    cleanup()

def cleanup():
    deleteDirIfExists(projectsPath + os.sep + project)
    deleteDirIfExists(shadowBuildDir(projectsPath, project, defaultQtVersion, 1))