Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

node tests: Add has_zoom_token to event.fixtures.

Steve Howell60b16a92e3c3
diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.js
index b818651650b..278dbfba51b 100644
--- a/frontend_tests/node_tests/compose.js
+++ b/frontend_tests/node_tests/compose.js
@@ -3,6 +3,8 @@
const {JSDOM} = require("jsdom");
const rewiremock = require("rewiremock/node");
+const events = require("./lib/events.js");
+
set_global("bridge", false);
const noop = function () {};
@@ -1495,10 +1497,10 @@ run_test("on_events", () => {
window.open = function (url) {
assert(url.endsWith("/calls/zoom/register"));
- server_events_dispatch.dispatch_normal_event({
- type: "has_zoom_token",
- value: true,
- });
+
+ // The event here has value=true. We keep it in events.js to
+ // allow our tooling to verify its schema.
+ server_events_dispatch.dispatch_normal_event(events.fixtures.has_zoom_token);
};
channel.post = function (payload) {
diff --git a/frontend_tests/node_tests/lib/events.js b/frontend_tests/node_tests/lib/events.js
index 95755a17f4d..b5d30e8048a 100644
--- a/frontend_tests/node_tests/lib/events.js
+++ b/frontend_tests/node_tests/lib/events.js
@@ -131,6 +131,11 @@ exports.fixtures = {
topic: "topic1",
},
+ has_zoom_token: {
+ type: "has_zoom_token",
+ value: true,
+ },
+
hotspots: {
type: "hotspots",
hotspots: [