This commit is contained in:
NissimHadar 2018-07-26 15:00:02 -07:00
parent 2dca95a146
commit 99ba550af5
4 changed files with 55 additions and 7 deletions

View file

@ -160,6 +160,10 @@ void TestRailInterface::createAddSectionsPythonScript(const QString& outputDirec
stream << "client.user = \'" << _user << "\'\n";
stream << "client.password = \'" << _password << "\'\n\n";
// top-level section
stream << "data = { \'name\': \'"
<< "Test Suite - " << QDateTime::currentDateTime().toString("yyyy-MM-ddTHH:mm") << "\'}\n";
file.close();
}
@ -188,7 +192,7 @@ void TestRailInterface::createTestSuitePython(const QString& testDirectory,
QDomElement topLevelSection = _document.createElement("section");
QDomElement suiteName = _document.createElement("name");
suiteName.appendChild(_document.createTextNode("Test Suite - " + QDateTime::currentDateTime().toString()));
suiteName.appendChild(_document.createTextNode("Test Suite - " + QDateTime::currentDateTime().toString("yyyy-MM-ddTHH:mm")));
topLevelSection.appendChild(suiteName);
QDomElement secondLevelSections = _document.createElement("sections");

View file

@ -15,6 +15,8 @@
TestRailSelectorWindow::TestRailSelectorWindow(QWidget *parent) {
setupUi(this);
projectLineEdit->setValidator(new QIntValidator(1, 999, this));
}
void TestRailSelectorWindow::on_OKButton_clicked() {
@ -40,13 +42,21 @@ QString TestRailSelectorWindow::getURL() {
}
void TestRailSelectorWindow::setUser(const QString& user) {
UserTextEdit->setText(user);
userTextEdit->setText(user);
}
QString TestRailSelectorWindow::getUser() {
return UserTextEdit->toPlainText();
return userTextEdit->toPlainText();
}
QString TestRailSelectorWindow::getPassword() {
return passwordLineEdit->text();
}
}
void TestRailSelectorWindow::setProject(const int project) {
projectLineEdit->setText(QString::number(project));
}
int TestRailSelectorWindow::getProject() {
return projectLineEdit->getText().toInt();
}

View file

@ -28,6 +28,9 @@ public:
QString getPassword();
void setProject(const int project);
int getProject();
bool userCancelled{ false };
private slots:

View file

@ -81,7 +81,7 @@
<property name="geometry">
<rect>
<x>120</x>
<y>200</y>
<y>240</y>
<width>93</width>
<height>28</height>
</rect>
@ -94,7 +94,7 @@
<property name="geometry">
<rect>
<x>280</x>
<y>200</y>
<y>240</y>
<width>93</width>
<height>28</height>
</rect>
@ -116,7 +116,7 @@
<enum>QLineEdit::Password</enum>
</property>
</widget>
<widget class="QTextEdit" name="UserTextEdit">
<widget class="QTextEdit" name="userTextEdit">
<property name="geometry">
<rect>
<x>200</x>
@ -144,6 +144,37 @@
<string>TestRail User</string>
</property>
</widget>
<widget class="QLineEdit" name="projectLineEdit">
<property name="geometry">
<rect>
<x>200</x>
<y>160</y>
<width>231</width>
<height>24</height>
</rect>
</property>
<property name="echoMode">
<enum>QLineEdit::Normal</enum>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>70</x>
<y>160</y>
<width>121</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>TestRail Project</string>
</property>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>