diff --git a/storybook/src/Storybook/PageToolBar.qml b/storybook/src/Storybook/PageToolBar.qml index 74f4fe8eae..0f75f1fd90 100644 --- a/storybook/src/Storybook/PageToolBar.qml +++ b/storybook/src/Storybook/PageToolBar.qml @@ -140,5 +140,8 @@ ToolBar { ? `Please add valid tests to ${testRunnerControls.testFileName} file` : "" } + + onAccepted: Qt.openUrlExternally(Qt.resolvedUrl(TestsRunner.testsPath())) + Component.onCompleted: standardButton(Dialog.Ok).text = "Open tests folder" } } diff --git a/storybook/testsrunner.cpp b/storybook/testsrunner.cpp index 5a1087c7bf..ae952170cc 100644 --- a/storybook/testsrunner.cpp +++ b/storybook/testsrunner.cpp @@ -49,3 +49,8 @@ QObject* TestsRunner::runTests(const QString& fileName) return testRunnerProcess; } + +QString TestsRunner::testsPath() const +{ + return m_testsBasePath; +} diff --git a/storybook/testsrunner.h b/storybook/testsrunner.h index 1b1d18f726..96218f92c9 100644 --- a/storybook/testsrunner.h +++ b/storybook/testsrunner.h @@ -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;