void GUITestService::runAllGUITests() { GUITests initTests = preChecks(); GUITests postChecksTests = postChecks(); GUITests postActiosTests = postActions(); GUITests tests = AppContext::getGUITestBase()->takeTests(); SAFE_POINT(false == tests.isEmpty(),"",); foreach(HI::GUITest* t, tests) { SAFE_POINT(NULL != t,"",); if (!t) { continue; } QString testName = t->getFullName(); QString testNameForTeamCity = t->getSuite() +"_"+ t->getName(); if (t->isIgnored()) { GUITestTeamcityLogger::testIgnored(testNameForTeamCity, t->getIgnoreMessage()); continue; } qint64 startTime = GTimer::currentTimeMicros(); GUITestTeamcityLogger::testStarted(testNameForTeamCity); HI::GUITestOpStatus os; log.trace("GTRUNNER - runAllGUITests - going to run initial checks before " + testName); foreach(HI::GUITest* t, initTests) { if (t) { t->run(os); } } clearSandbox(); log.trace("GTRUNNER - runAllGUITests - going to run test " + testName); t->run(os); log.trace("GTRUNNER - runAllGUITests - finished running test " + testName); foreach(HI::GUITest* t, postChecksTests) { if (t) { t->run(os); } } HI::GUITestOpStatus os2; foreach(HI::GUITest* t, postActiosTests) { if (t) { t->run(os2); } } QString testResult = os.hasError() ? os.getError() : GUITestTeamcityLogger::successResult; qint64 finishTime = GTimer::currentTimeMicros(); GUITestTeamcityLogger::teamCityLogResult(testNameForTeamCity, testResult, GTimer::millisBetween(startTime, finishTime)); }
void ImportPrimersDialogFiller::setImportTarget(HI::GUITestOpStatus &os, ImportSource importSource) { switch (importSource) { case LocalFiles: GTComboBox::setIndexWithText(os, GTWidget::findExactWidget<QComboBox *>(os, "cbSource", getDialog(os)), "Local file(s)"); break; case SharedDb: GTComboBox::setIndexWithText(os, GTWidget::findExactWidget<QComboBox *>(os, "cbSource", getDialog(os)), "Shared database"); break; default: os.setError("Unexpected import source"); } }
void GTUtilsAssemblyBrowser::callContextMenu(HI::GUITestOpStatus &os, GTUtilsAssemblyBrowser::Area area) { QString widgetName; switch (area) { case Consensus: widgetName = "Consensus area"; break; case Overview: widgetName = "Zoomable assembly overview"; break; case Reads: widgetName = "assembly_reads_area"; break; default: os.setError("Can't find the area"); FAIL(false, ); } GTWidget::click(os, GTWidget::findWidget(os, widgetName), Qt::RightButton); }
void GTUtilsAssemblyBrowser::callExportCoverageDialog(HI::GUITestOpStatus &os, Area area) { Q_UNUSED(os); switch (area) { case Consensus: GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Export coverage")); break; case Overview: GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Export coverage")); break; case Reads: GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Export" << "Export coverage")); break; default: os.setError("Can't call the dialog on this area"); FAIL(false, ); } callContextMenu(os, area); }