mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Can rename the High Fidelity folder in AppData
This commit is contained in:
parent
3786f2b4d0
commit
4e677c85f6
6 changed files with 61 additions and 13 deletions
|
@ -920,6 +920,38 @@ void Test::createTestRailRun() {
|
||||||
_testRailInterface.createTestRailRun(outputDirectory);
|
_testRailInterface.createTestRailRun(outputDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Test::runNow() {
|
||||||
|
// Rename the existing data directory, and create an empty one
|
||||||
|
QString dataDirectory{ "NOT FOUND" };
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
dataDirectory = qgetenv("USERPROFILE") + "\\AppData\\Roaming";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QDir highfidelityDirectory{ dataDirectory + "\\High Fidelity" };
|
||||||
|
|
||||||
|
if (!highfidelityDirectory.exists()) {
|
||||||
|
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__),
|
||||||
|
"The High Fidelity data folder was not found in " + dataDirectory);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The original folder is saved in a unique name
|
||||||
|
QDir savedDataFolder{ dataDirectory + "/fgadhcUDHSFaidsfh3478JJJFSDFIUSOEIrf" };
|
||||||
|
highfidelityDirectory.rename(QDir::fromNativeSeparators(highfidelityDirectory.path()),
|
||||||
|
QDir::toNativeSeparators(savedDataFolder.path()));
|
||||||
|
|
||||||
|
QDir().mkdir(highfidelityDirectory.path());
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Finally - restore the data folder
|
||||||
|
QDir().rmdir(highfidelityDirectory.path());
|
||||||
|
|
||||||
|
highfidelityDirectory.rename(QDir::fromNativeSeparators(savedDataFolder.path()),
|
||||||
|
QDir::toNativeSeparators(highfidelityDirectory.path()));
|
||||||
|
}
|
||||||
|
|
||||||
void Test::updateTestRailRunResult() {
|
void Test::updateTestRailRunResult() {
|
||||||
QString testResults = QFileDialog::getOpenFileName(nullptr, "Please select the zipped test results to update from", nullptr,
|
QString testResults = QFileDialog::getOpenFileName(nullptr, "Please select the zipped test results to update from", nullptr,
|
||||||
"Zipped Test Results (*.zip)");
|
"Zipped Test Results (*.zip)");
|
||||||
|
|
|
@ -63,6 +63,9 @@ public:
|
||||||
|
|
||||||
void createTestRailTestCases();
|
void createTestRailTestCases();
|
||||||
void createTestRailRun();
|
void createTestRailRun();
|
||||||
|
|
||||||
|
void runNow();
|
||||||
|
|
||||||
void updateTestRailRunResult();
|
void updateTestRailRunResult();
|
||||||
|
|
||||||
void createRecursiveScript();
|
void createRecursiveScript();
|
||||||
|
|
|
@ -21,37 +21,25 @@
|
||||||
|
|
||||||
TestRailInterface::TestRailInterface() {
|
TestRailInterface::TestRailInterface() {
|
||||||
_testRailTestCasesSelectorWindow.setURL("https://highfidelity.testrail.net");
|
_testRailTestCasesSelectorWindow.setURL("https://highfidelity.testrail.net");
|
||||||
////_testRailTestCasesSelectorWindow.setURL("https://nissimhadar.testrail.io");
|
|
||||||
_testRailTestCasesSelectorWindow.setUser("@highfidelity.io");
|
_testRailTestCasesSelectorWindow.setUser("@highfidelity.io");
|
||||||
////_testRailTestCasesSelectorWindow.setUser("nissim.hadar@gmail.com");
|
|
||||||
|
|
||||||
_testRailTestCasesSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
_testRailTestCasesSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
||||||
////_testRailTestCasesSelectorWindow.setProjectID(2);
|
|
||||||
|
|
||||||
_testRailTestCasesSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
_testRailTestCasesSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
||||||
////_testRailTestCasesSelectorWindow.setSuiteID(2);
|
|
||||||
|
|
||||||
_testRailRunSelectorWindow.setURL("https://highfidelity.testrail.net");
|
_testRailRunSelectorWindow.setURL("https://highfidelity.testrail.net");
|
||||||
////_testRailRunSelectorWindow.setURL("https://nissimhadar.testrail.io");
|
|
||||||
_testRailRunSelectorWindow.setUser("@highfidelity.io");
|
_testRailRunSelectorWindow.setUser("@highfidelity.io");
|
||||||
////_testRailRunSelectorWindow.setUser("nissim.hadar@gmail.com");
|
|
||||||
|
|
||||||
_testRailRunSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
_testRailRunSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
||||||
////_testRailRunSelectorWindow.setProjectID(2);
|
|
||||||
|
|
||||||
_testRailRunSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
_testRailRunSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
||||||
////_testRailRunSelectorWindow.setSuiteID(2);
|
|
||||||
|
|
||||||
_testRailResultsSelectorWindow.setURL("https://highfidelity.testrail.net");
|
_testRailResultsSelectorWindow.setURL("https://highfidelity.testrail.net");
|
||||||
////_testRailResultsSelectorWindow.setURL("https://nissimhadar.testrail.io");
|
|
||||||
_testRailResultsSelectorWindow.setUser("@highfidelity.io");
|
_testRailResultsSelectorWindow.setUser("@highfidelity.io");
|
||||||
////_testRailResultsSelectorWindow.setUser("nissim.hadar@gmail.com");
|
|
||||||
|
|
||||||
_testRailResultsSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
_testRailResultsSelectorWindow.setProjectID(INTERFACE_AUTOMATION_PROJECT_ID);
|
||||||
////_testRailResultsSelectorWindow.setProjectID(2);
|
|
||||||
|
|
||||||
_testRailResultsSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
_testRailResultsSelectorWindow.setSuiteID(INTERFACE_SUITE_ID);
|
||||||
////_testRailResultsSelectorWindow.setSuiteID(2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TestRailInterface::getObject(const QString& path) {
|
QString TestRailInterface::getObject(const QString& path) {
|
||||||
|
|
|
@ -98,6 +98,10 @@ void AutoTester::on_createTestRailRunButton_clicked() {
|
||||||
_test->createTestRailRun();
|
_test->createTestRailRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoTester::on_runNowButton_clicked() {
|
||||||
|
_test->runNow();
|
||||||
|
}
|
||||||
|
|
||||||
void AutoTester::on_updateTestRailRunResultsButton_clicked() {
|
void AutoTester::on_updateTestRailRunResultsButton_clicked() {
|
||||||
_test->updateTestRailRunResult();
|
_test->updateTestRailRunResult();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,9 @@ private slots:
|
||||||
|
|
||||||
void on_createTestRailTestCasesButton_clicked();
|
void on_createTestRailTestCasesButton_clicked();
|
||||||
void on_createTestRailRunButton_clicked();
|
void on_createTestRailRunButton_clicked();
|
||||||
|
|
||||||
|
void on_runNowButton_clicked();
|
||||||
|
|
||||||
void on_updateTestRailRunResultsButton_clicked();
|
void on_updateTestRailRunResultsButton_clicked();
|
||||||
|
|
||||||
void on_hideTaskbarButton_clicked();
|
void on_hideTaskbarButton_clicked();
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_1">
|
<widget class="QWidget" name="tab_1">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -154,6 +154,24 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Run</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QPushButton" name="runNowButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>200</x>
|
||||||
|
<y>200</y>
|
||||||
|
<width>93</width>
|
||||||
|
<height>28</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Run now</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="tab_2">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Evaluate</string>
|
<string>Evaluate</string>
|
||||||
|
|
Loading…
Reference in a new issue