From 87e7eb78a801349f8cd0257d5e7dc73261a6f0f6 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 31 Jul 2018 13:30:30 -0700 Subject: [PATCH] Corrected links to MD files. --- tools/auto-tester/src/TestRailInterface.cpp | 13 ++++++++++--- tools/auto-tester/src/ui/TestRailSelectorWindow.cpp | 11 +++++++++++ tools/auto-tester/src/ui/TestRailSelectorWindow.h | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 31594fe66a..9142e24986 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -190,6 +190,8 @@ void TestRailInterface::createStackDotPyScript() { } void TestRailInterface::requestTestRailDataFromUser() { + // Make sure correct fields are enabled before calling + _testRailSelectorWindow.reset(); _testRailSelectorWindow.exec(); if (_testRailSelectorWindow.getUserCancelled()) { @@ -428,10 +430,12 @@ void TestRailInterface::createTestSuitePython(const QString& testDirectory, } requestTestRailDataFromUser(); - getMilestonesFromTestRail(); createTestRailDotPyScript(); createStackDotPyScript(); - } + + // TestRail will be updated after the process initiated by getMilestonesFromTestRail has completed + getMilestonesFromTestRail(); +} void TestRailInterface::createTestSuiteXML(const QString& testDirectory, const QString& outputDirectory, @@ -659,10 +663,13 @@ void TestRailInterface::processTestPython(const QString& fullDirectory, title += " / " + words[i]; } + // To create the path to test.md, prefix by tests, and remove blanks + QString pathToTestMD = QString("/tests/") + title.remove(" "); + stream << "section_id = parent_ids.peek()\n"; QString testMDName = QString("https://github.com/") + userGitHub + "/hifi_tests/blob/" + branchGitHub + - "/tests/content/entity/light/point/create/test.md"; + pathToTestMD + "/test.md "; QString testContent = QString("Execute instructions in [THIS TEST](") + testMDName + ")"; QString testExpected = QString("Refer to the expected result in the linked description."); diff --git a/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp b/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp index afa94b31d0..cb1c805923 100644 --- a/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp +++ b/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp @@ -19,6 +19,17 @@ TestRailSelectorWindow::TestRailSelectorWindow(QWidget *parent) { projectIDLineEdit->setValidator(new QIntValidator(1, 999, this)); } + +void TestRailSelectorWindow::reset() { + urlLineEdit->setDisabled(false); + userLineEdit->setDisabled(false); + passwordLineEdit->setDisabled(false); + projectIDLineEdit->setDisabled(false); + + OKButton->setDisabled(true); + milestoneComboBox->setDisabled(true); +} + void TestRailSelectorWindow::on_acceptButton_clicked() { urlLineEdit->setDisabled(true); userLineEdit->setDisabled(true); diff --git a/tools/auto-tester/src/ui/TestRailSelectorWindow.h b/tools/auto-tester/src/ui/TestRailSelectorWindow.h index 20bb012723..89af63d1e2 100644 --- a/tools/auto-tester/src/ui/TestRailSelectorWindow.h +++ b/tools/auto-tester/src/ui/TestRailSelectorWindow.h @@ -18,6 +18,8 @@ class TestRailSelectorWindow : public QDialog, public Ui::TestRailSelectorWindow public: TestRailSelectorWindow(QWidget* parent = Q_NULLPTR); + void reset(); + bool getUserCancelled(); void setURL(const QString& user);