MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / testGui

Method testGui

src/tests/class_tests/openms_gui/source/GUI/TOPPView_test.cpp:96–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void TestTOPPView::testGui()
97{
98 // register a GUI logger
99 Factory<ProgressLogger::ProgressLoggerImpl>::registerProduct(GUIProgressLoggerImpl::getProductName(), &GUIProgressLoggerImpl::create);
100
101 TOPPViewBase tv(TOPPViewBase::TOOL_SCAN::SKIP_SCAN);
102 tv.show();
103 QApplication::processEvents();
104
105 QTest::qWait(1000);
106
107#if 1 //def __APPLE__ // MAC OS does not support entering a filename via keyboard in the file-open menu
108 tv.addDataFile(File::getOpenMSDataPath() + "/examples/peakpicker_tutorial_1.mzML", false, false);
109 QCOMPARE(tv.tab_bar_.tabText(tv.tab_bar_.currentIndex()), QString("peakpicker_tutorial_1 (1D)"));
110#else
111 scheduleModalWidget_("peakpicker_tutorial_1.mzML", "Open file(s)",1000); // Open File dialog
112 scheduleModalWidget_("", "Open data options for peakpicker_tutorial_1.mzML",1000); // layer data options dialog
113 // open file dialog
114 QTest::keyClicks(&tv,"f", Qt::AltModifier);
115 QApplication::processEvents();
116 // before we open the File-Open Dialog, we need to schedule the planned keyboard input
117 // as this dialog is modal and won't return.
118 // launch the modal widget
119 QTest::keyClicks(0,"e");
120 QApplication::processEvents();
121 waitForModalWidget(15000, __LINE__);
122#endif
123
124 // compare the name of the opened tab
125 QCOMPARE(tv.tab_bar_.tabText(tv.tab_bar_.currentIndex()), QString("peakpicker_tutorial_1 (1D)"));
126}
127
128// expands to a simple main() method that runs all the test functions
129QTEST_MAIN(TestTOPPView)

Callers

nothing calls this directly

Calls 4

showMethod · 0.80
addDataFileMethod · 0.80
getProductNameFunction · 0.50
QStringClass · 0.50

Tested by

no test coverage detected