diff --git a/src/ur/dashboard_client.cpp b/src/ur/dashboard_client.cpp index b05b54509..3aecb1f86 100644 --- a/src/ur/dashboard_client.cpp +++ b/src/ur/dashboard_client.cpp @@ -322,7 +322,8 @@ bool DashboardClient::commandQuit() bool DashboardClient::commandRunning() { assertVersion("5.0.0", "1.6", "running"); - return sendRequest("running", "Program running: true"); + std::string const response = sendAndReceive("running"); + return std::regex_match(response, std::regex("Program running: true")); } bool DashboardClient::commandIsProgramSaved() diff --git a/tests/test_dashboard_client.cpp b/tests/test_dashboard_client.cpp index 5990e461c..d0798c458 100644 --- a/tests/test_dashboard_client.cpp +++ b/tests/test_dashboard_client.cpp @@ -89,7 +89,9 @@ TEST_F(DashboardClientTest, run_program) EXPECT_TRUE(dashboard_client_->commandPlay()); EXPECT_TRUE(dashboard_client_->commandPause()); EXPECT_TRUE(dashboard_client_->commandPlay()); + EXPECT_TRUE(dashboard_client_->commandRunning()); EXPECT_TRUE(dashboard_client_->commandStop()); + EXPECT_FALSE(dashboard_client_->commandRunning()); EXPECT_TRUE(dashboard_client_->commandPowerOff()); dashboard_client_->commandClosePopup(); // Necessary for CB3 test }