From 6a4b3e67e0ffce1da332c43537a911a970edfdda Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 4 Oct 2022 12:55:09 +0200 Subject: [PATCH] Squish: Expect file changes when recording Expect the object map to change in general and the test script file to change on successful recording to avoid unneeded confirmation by the user. Change-Id: I72fe4534fdc7b6b7064222f7c9b0e0989cc17976 Reviewed-by: David Schulz --- src/plugins/squish/squishtools.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/squish/squishtools.cpp b/src/plugins/squish/squishtools.cpp index 463109eda60..d9a51b1e798 100644 --- a/src/plugins/squish/squishtools.cpp +++ b/src/plugins/squish/squishtools.cpp @@ -12,6 +12,7 @@ #include // TODO remove +#include #include #include #include @@ -637,6 +638,8 @@ void SquishTools::setupAndStartRecorder() m_recorderProcess.setCommand({toolsSettings.runnerPath, args}); qCDebug(LOG) << "Recorder starting:" << m_recorderProcess.commandLine().toUserOutput(); + if (m_suiteConf.objectMapPath().isReadableFile()) + Core::DocumentManager::expectFileChange(m_suiteConf.objectMapPath()); m_recorderProcess.start(); } @@ -737,6 +740,7 @@ void SquishTools::onRecorderFinished() const ScriptHelper helper(m_suiteConf.language()); const Utils::FilePath testFile = m_currentTestCasePath.pathAppended( "test" + m_suiteConf.scriptExtension()); + Core::DocumentManager::expectFileChange(testFile); bool result = helper.writeScriptFile(testFile, m_currentRecorderSnippetFile, m_suiteConf.aut(), m_suiteConf.arguments());