Hacker News new | ask | show | jobs
by phkahler 246 days ago
How do you validate that each elements status is working? That there are no typos or copy/paste errors lurking in there? I guess you can inject test data after the sql query and verify the right elements change.
1 comments

You can use the browser console to inject any value to any element to verify expected behaviour.

There are also patterns in the water network so issues reveal themselves pretty quick then easy to fix. E.g. pumps on=green, off=grey, fault=red. Easy to spot an element that is misconfigured especially when you look at it all day.

You can also hover over an element and it reveals its tagname in a tooltip which helps. And the script has an error log for things such as if there are any tagnames in the query it can't find a drawing element for or if it failed to set some value

>> You can use the browser console to inject any value to any element to verify expected behaviour.

Thanks! I'm not a web dev, so I'm not familiar with what that console can do or how easy that is. Sounds like fun.