feat(Storybook): Open tests dir from the app

This commit is contained in:
Michał Cieślak 2023-10-10 16:14:02 +02:00 committed by Michał
parent 8a996a9175
commit 5784f4cd87
3 changed files with 9 additions and 0 deletions

View File

@ -140,5 +140,8 @@ ToolBar {
? `Please add valid tests to <b>${testRunnerControls.testFileName}</b> file`
: ""
}
onAccepted: Qt.openUrlExternally(Qt.resolvedUrl(TestsRunner.testsPath()))
Component.onCompleted: standardButton(Dialog.Ok).text = "Open tests folder"
}
}

View File

@ -49,3 +49,8 @@ QObject* TestsRunner::runTests(const QString& fileName)
return testRunnerProcess;
}
QString TestsRunner::testsPath() const
{
return m_testsBasePath;
}

View File

@ -11,6 +11,7 @@ public:
Q_INVOKABLE int testsCount(const QString& path);
Q_INVOKABLE QObject* runTests(const QString& path);
Q_INVOKABLE QString testsPath() const;
private:
QString m_testRunnerExecutablePath;