Fix Orion AMS mapping and show printer health details
This commit is contained in:
@@ -50,9 +50,25 @@ int main() {
|
||||
assert(data.status_color() == RED);
|
||||
data.print_error = "off";
|
||||
data.hms_error = "True";
|
||||
assert(data.status_text() == "HMS ALERT");
|
||||
assert(data.status_text() == "HEALTH NOTICE");
|
||||
assert(data.status_color() == AMBER);
|
||||
assert(data.health_details().find("have not arrived") != std::string::npos);
|
||||
data.hms_count = "1";
|
||||
data.health_notices = {{"DEMO_CODE", "A synthetic information message", "info"}};
|
||||
assert(data.status_text() == "HEALTH INFO");
|
||||
assert(data.health_details().find("DEMO_CODE") != std::string::npos);
|
||||
assert(data.alert_summary() == "A synthetic information message");
|
||||
data.health_notices.push_back({"DEMO_2", "A synthetic serious message", "serious"});
|
||||
data.hms_count = "2";
|
||||
assert(data.status_text() == "HEALTH ERROR");
|
||||
assert(data.status_color() == RED);
|
||||
assert(data.health_details().find("A synthetic serious message") != std::string::npos);
|
||||
data.health_notices.pop_back();
|
||||
data.hms_count = "5";
|
||||
assert(data.status_text() == "HEALTH NOTICE");
|
||||
assert(data.health_details().find("4 more") != std::string::npos);
|
||||
data.hms_error = "off";
|
||||
assert(data.health_details() == "No current printer health notifications.");
|
||||
data.status = "finish";
|
||||
assert(data.status_text() == "COMPLETE");
|
||||
assert(data.status_color() == GREEN);
|
||||
|
||||
Reference in New Issue
Block a user