Closed KeesCBakker closed 12 months ago
😲
Gonna set aside some time to review it with my full attention. If you don't hear from me by Monday, give me a nudge.
Improved some tests, found some extra blind spots to fix
Also added kiosk mode for dashboards, so we fix #72
@stephenyeargin would you be able to test RocketChat, BearyChat and Telegram to see if they are still OK?
@stephenyeargin would you be able to test RocketChat, BearyChat and Telegram to see if they are still OK?
So, those were introduced by other contributors, I don't actually have accounts with any of them. Can tag folks and give them some time to give it a spin. Generally speaking, if the tests pass, I'm not too worried about a regression. 😁
BearyChat - @shonenada via #65 RocketChat - @mfilotto via #70 Telegram - @pinguingman via #135
I'm okay with merging and publishing.
This big refactor is about the following:
GrafanaClient
that is a small wrapper over the Hubot HTTP to aide with interactions with Grafana. The client is created in thecreateGrafanaClient
function and it takes care of theHUBOT_GRAFANA_PER_ROOM
setting based on the response.hubot-mock-adapter
and a small wrapper (more here: https://keestalkstech.com/2023/08/hubot-testing-revisited/). We leveraged Promises / async / await instead of usingsetTimeout
. All tests will now finish within a second, which makes committing and pushing better. By moving some of the testcases to theTestBot
, we don't have to setup all the tests every time. By droppinghubot-test-helper
, we're able to test against version 7 of Hubot (earlier versions had problems with the Log feature). We can now also dropsinon
,require-dir
andsinon-chai
. The new test setup has no knowledge of rooms and users -- when I look to the testcases we don't need them.kiosk
parameter. Added the test cases as well.With this refactor there comes some ifs and buts:
msg
object was not the message, but theres
object, which contains a message. So I refactored some of those references. Not all of them, because that would muddy the PR a bit, we need to do that later.This has been a huge refactor, but I think it helps us with going forward. I think we should test some more platforms before releasing. When we release let's make sure we release a major version, so everyone can double check before upgrading.
Fixes #165 Fixes #164