Commit ea375239 authored by Eric Dejouhanet's avatar Eric Dejouhanet
Browse files

Test shutter control.

parent 38d4401c
Pipeline #66476 passed with stages
in 26 minutes and 3 seconds
......@@ -75,6 +75,7 @@ void TestEkosObservatory::testMoveAndParking()
KTRY_OBS_CLICK(domePark);
QTRY_VERIFY_WITH_TIMEOUT(domePark->isChecked(), 60000);
}
QVERIFY(!domeUnpark->isChecked());
KTELL("Unpark Dome");
KTRY_OBS_CLICK(domeUnpark);
......@@ -119,6 +120,59 @@ void TestEkosObservatory::testMoveAndParking()
QTRY_VERIFY_WITH_TIMEOUT(domeAzimuthPosition->value() == parkPosition, 5000);
}
void TestEkosObservatory::testShutter()
{
KTRY_OBS_SHOW();
KTRY_OBS_GADGET(QComboBox, domeInstanceDropBox);
QTRY_VERIFY_WITH_TIMEOUT(domeInstanceDropBox->isEnabled(), 5000);
QVERIFY(domeInstanceDropBox->count() == 1);
QCOMPARE(qPrintable(domeInstanceDropBox->currentText()), "Dome Simulator");
KTRY_OBS_GADGET(QPushButton, domePark);
KTRY_OBS_GADGET(QPushButton, domeUnpark);
KTELL("Ensure Dome is parked as initial state");
if (domeUnpark->isChecked())
{
KTRY_OBS_CLICK(domePark);
QTRY_VERIFY_WITH_TIMEOUT(domePark->isChecked(), 60000);
}
QVERIFY(!domeUnpark->isChecked());
KTRY_OBS_GADGET(QPushButton, shutterClosed);
KTRY_OBS_GADGET(QPushButton, shutterOpen);
KTELL("Ensure Shutter is closed as initial state, then manipulate it");
QVERIFY(shutterClosed->isChecked());
KTRY_OBS_CLICK(shutterOpen);
QTRY_VERIFY_WITH_TIMEOUT(shutterOpen->isChecked(), 60000);
QVERIFY(!shutterClosed->isChecked());
KTRY_OBS_CLICK(shutterClosed);
QTRY_VERIFY_WITH_TIMEOUT(shutterClosed->isChecked(), 60000);
QVERIFY(!shutterOpen->isChecked());
KTELL("Unpark dome, check shutter does not open, then manipulate it");
KTRY_OBS_CLICK(domeUnpark);
QTRY_VERIFY_WITH_TIMEOUT(domeUnpark->isChecked(), 60000);
QVERIFY(shutterClosed->isChecked());
KTRY_OBS_CLICK(shutterOpen);
QTRY_VERIFY_WITH_TIMEOUT(shutterOpen->isChecked(), 60000);
QVERIFY(!shutterClosed->isChecked());
KTRY_OBS_CLICK(shutterClosed);
QTRY_VERIFY_WITH_TIMEOUT(shutterClosed->isChecked(), 60000);
QVERIFY(!shutterOpen->isChecked());
KTRY_OBS_CLICK(shutterOpen);
QTRY_VERIFY_WITH_TIMEOUT(shutterOpen->isChecked(), 60000);
QVERIFY(!shutterClosed->isChecked());
KTELL("Park dome, check shutter closes");
KTRY_OBS_CLICK(domePark);
QTRY_VERIFY_WITH_TIMEOUT(domePark->isChecked(), 60000);
QTRY_VERIFY_WITH_TIMEOUT(shutterClosed->isChecked(), 60000);
QVERIFY(!shutterOpen->isChecked());
}
QTEST_KSTARS_MAIN(TestEkosObservatory)
#endif // HAVE_INDI
......@@ -61,6 +61,7 @@ private slots:
void cleanup();
void testMoveAndParking();
void testShutter();
};
#endif // HAVE_INDI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment