[education/rkward] rkward/autotests: Add basic test for HTML window availability
Thomas Friedrichsmeier
null at kde.org
Sat Jun 8 09:22:47 BST 2024
Git commit ee4a70b3f1297826a097fe5f69c50cfc596b5b8b by Thomas Friedrichsmeier.
Committed on 19/05/2024 at 21:58.
Pushed by tfry into branch 'master'.
Add basic test for HTML window availability
M +12 -0 rkward/autotests/core_test.cpp
https://invent.kde.org/education/rkward/-/commit/ee4a70b3f1297826a097fe5f69c50cfc596b5b8b
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index 0d895d4e4..ffef9a0e5 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -397,6 +397,18 @@ private Q_SLOTS:
waitForAllFinished(5000); // priority_command_done must remain in scope until done
}
+ void HTMLWindowTest() {
+ // this test, too, is extremely basic, but sometimes there are problems instantiating a QWebEnginePage
+ runCommandAsync(new RCommand("?print", RCommand::User), nullptr, [](RCommand *command) {
+ QVERIFY(!command->failed());
+ QCOMPARE(RKWorkplace::mainWorkplace()->getObjectList(RKMDIWindow::HelpWindow).size(), 1);
+ RKWorkplace::mainWorkplace()->closeAll(RKMDIWindow::HelpWindow);
+ QCOMPARE(RKWorkplace::mainWorkplace()->getObjectList(RKMDIWindow::HelpWindow).size(), 0);
+ });
+ RInterface::issueCommand(new RCommand("dev.off()", RCommand::User));
+ waitForAllFinished(5000); // priority_command_done must remain in scope until done
+ }
+
void restartRBackend() {
auto restart_action = RKWardMainWindow::getMain()->actionCollection()->action("restart_r");
QVERIFY(restart_action != nullptr);
More information about the rkward-tracker
mailing list