mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
Adding buttons to Run on Mobile tab.
This commit is contained in:
parent
28c9b7e1e6
commit
5cffdafd22
4 changed files with 93 additions and 22 deletions
|
@ -48,8 +48,12 @@ Nitpick::~Nitpick() {
|
|||
delete _test;
|
||||
}
|
||||
|
||||
if (_testRunner) {
|
||||
delete _testRunner;
|
||||
if (_testRunnerDesktop) {
|
||||
delete _testRunnerDesktop;
|
||||
}
|
||||
|
||||
if (_testRunnerMobile) {
|
||||
delete _testRunnerMobile;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,10 +84,16 @@ void Nitpick::setup() {
|
|||
timeEdits.emplace_back(_ui.timeEdit3);
|
||||
timeEdits.emplace_back(_ui.timeEdit4);
|
||||
|
||||
if (_testRunner) {
|
||||
delete _testRunner;
|
||||
// Create the two test runners
|
||||
if (_testRunnerDesktop) {
|
||||
delete _testRunnerDesktop;
|
||||
}
|
||||
_testRunner = new TestRunnerDesktop(dayCheckboxes, timeEditCheckboxes, timeEdits, _ui.workingFolderLabel, _ui.checkBoxServerless, _ui.checkBoxRunLatest, _ui.urlLineEdit, _ui.runNowButton);
|
||||
_testRunnerDesktop = new TestRunnerDesktop(dayCheckboxes, timeEditCheckboxes, timeEdits, _ui.workingFolderRunOnDesktopLabel, _ui.checkBoxServerless, _ui.checkBoxRunLatest, _ui.urlLineEdit, _ui.runNowButton);
|
||||
|
||||
if (_testRunnerMobile) {
|
||||
delete _testRunnerMobile;
|
||||
}
|
||||
_testRunnerMobile = new TestRunnerMobile();
|
||||
}
|
||||
|
||||
void Nitpick::startTestsEvaluation(const bool isRunningFromCommandLine,
|
||||
|
@ -154,8 +164,8 @@ void Nitpick::on_createTestRailRunButton_clicked() {
|
|||
_test->createTestRailRun();
|
||||
}
|
||||
|
||||
void Nitpick::on_setWorkingFolderButton_clicked() {
|
||||
_testRunner->setWorkingFolder();
|
||||
void Nitpick::on_setWorkingFolderRunOnDesktopButton_clicked() {
|
||||
_testRunnerDesktop->setWorkingFolder();
|
||||
}
|
||||
|
||||
void Nitpick::enableRunTabControls() {
|
||||
|
@ -165,7 +175,7 @@ void Nitpick::enableRunTabControls() {
|
|||
}
|
||||
|
||||
void Nitpick::on_runNowButton_clicked() {
|
||||
_testRunner->run();
|
||||
_testRunnerDesktop->run();
|
||||
}
|
||||
|
||||
void Nitpick::on_checkBoxRunLatest_clicked() {
|
||||
|
@ -173,7 +183,7 @@ void Nitpick::on_checkBoxRunLatest_clicked() {
|
|||
}
|
||||
|
||||
void Nitpick::automaticTestRunEvaluationComplete(QString zippedFolderName, int numberOfFailures) {
|
||||
_testRunner->automaticTestRunEvaluationComplete(zippedFolderName, numberOfFailures);
|
||||
_testRunnerDesktop->automaticTestRunEvaluationComplete(zippedFolderName, numberOfFailures);
|
||||
}
|
||||
|
||||
void Nitpick::on_updateTestRailRunResultsButton_clicked() {
|
||||
|
@ -273,8 +283,8 @@ void Nitpick::saveFile(int index) {
|
|||
disconnect(_signalMapper, SIGNAL(mapped(int)), this, SLOT(saveFile(int)));
|
||||
if (_caller == _test) {
|
||||
_test->finishTestsEvaluation();
|
||||
} else if (_caller == _testRunner) {
|
||||
_testRunner->downloadComplete();
|
||||
} else if (_caller == _testRunnerDesktop) {
|
||||
_testRunnerDesktop->downloadComplete();
|
||||
}
|
||||
} else {
|
||||
_ui.progressBar->setValue(_numberOfFilesDownloaded);
|
||||
|
@ -312,3 +322,6 @@ void Nitpick::updateStatusLabel(const QString& status) {
|
|||
void Nitpick::appendLogWindow(const QString& message) {
|
||||
_ui.plainTextEdit->appendPlainText(message);
|
||||
}
|
||||
|
||||
void Nitpick::on_setWorkingFolderRunOnMobileButton_clicked() {
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include "Test.h"
|
||||
|
||||
#include "TestRunnerDesktop.h"
|
||||
#include "TestRunnerMobile.h"
|
||||
|
||||
#include "AWSInterface.h"
|
||||
|
||||
class Nitpick : public QMainWindow {
|
||||
|
@ -71,9 +73,11 @@ private slots:
|
|||
void on_createTestRailTestCasesButton_clicked();
|
||||
void on_createTestRailRunButton_clicked();
|
||||
|
||||
void on_setWorkingFolderButton_clicked();
|
||||
void on_setWorkingFolderRunOnDesktopButton_clicked();
|
||||
void on_runNowButton_clicked();
|
||||
|
||||
void on_setWorkingFolderRunOnMobileButton_clicked();
|
||||
|
||||
void on_checkBoxRunLatest_clicked();
|
||||
|
||||
void on_updateTestRailRunResultsButton_clicked();
|
||||
|
@ -96,7 +100,9 @@ private slots:
|
|||
private:
|
||||
Ui::NitpickClass _ui;
|
||||
Test* _test{ nullptr };
|
||||
TestRunnerDesktop* _testRunner{ nullptr };
|
||||
|
||||
TestRunnerDesktop* _testRunnerDesktop{ nullptr };
|
||||
TestRunnerMobile* _testRunnerMobile{ nullptr };
|
||||
|
||||
AWSInterface _awsInterface;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
class TestRunnerMobile : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TestRunnerMobile(QObject* parent);
|
||||
explicit TestRunnerMobile(QObject* parent = 0);
|
||||
~TestRunnerMobile();
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_1">
|
||||
<attribute name="title">
|
||||
|
@ -420,26 +420,26 @@
|
|||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="setWorkingFolderButton">
|
||||
<widget class="QPushButton" name="setWorkingFolderRunOnDesktopButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>161</width>
|
||||
<height>28</height>
|
||||
<width>160</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Working Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="workingFolderLabel">
|
||||
<widget class="QLabel" name="workingFolderRunOnDesktopLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>20</y>
|
||||
<width>321</width>
|
||||
<height>31</height>
|
||||
<width>320</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -551,6 +551,58 @@
|
|||
<attribute name="title">
|
||||
<string>Run on Device</string>
|
||||
</attribute>
|
||||
<widget class="QPushButton" name="getDeviceButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>100</y>
|
||||
<width>160</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>100</y>
|
||||
<width>230</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(not detected)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="setWorkingFolderRunOnMobileButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>160</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Working Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="workingFolderRunOnMobileLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>20</y>
|
||||
<width>320</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(not set...)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
|
@ -882,7 +934,7 @@
|
|||
<tabstop>timeEdit2checkBox</tabstop>
|
||||
<tabstop>timeEdit3checkBox</tabstop>
|
||||
<tabstop>timeEdit4checkBox</tabstop>
|
||||
<tabstop>setWorkingFolderButton</tabstop>
|
||||
<tabstop>setWorkingFolderRunOnDesktopButton</tabstop>
|
||||
<tabstop>plainTextEdit</tabstop>
|
||||
<tabstop>checkBoxServerless</tabstop>
|
||||
<tabstop>checkBoxRunLatest</tabstop>
|
||||
|
|
Loading…
Reference in a new issue