Added EmuFrontObject test and (very) initial PlatformNameDialogTest.
[emufront] / testing / EmuFrontTesting / platformnamedialogtest.cpp
1 #include "platformnamedialogtest.h"
2
3 void PlatformNameDialogTest::testLineEdit()
4 {
5     Platform *plf = new Platform(1, "");
6     PlatformNameDialog dlg;
7     dlg.setDataObject(plf);
8     dlg.show();
9     QTest::qWait(2000);
10
11     /*QTest::mouseClick(&dlg, Qt::LeftButton);*/
12     QTest::keyClick(&dlg, Qt::Key_N, Qt::AltModifier);
13     QTest::keyClicks(&dlg, "hello world");
14     QTest::qWait(1000);
15     QTest::keyClick(&dlg, Qt::Key_Enter);
16     QCOMPARE(plf->getName(), QString("hello world"));
17 }