Files
zulip/frontend_tests/puppeteer_tests/02-message-basics.js
Anders Kaseorg 6ec808b8df js: Add "use strict" directive to CommonJS files.
ES and TypeScript modules are strict by default and don’t need this
directive.  ESLint will remind us to add it to new CommonJS files and
remove it from ES and TypeScript modules.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-31 22:09:46 -07:00

29 lines
1.0 KiB
JavaScript

"use strict";
const common = require("../puppeteer_lib/common");
async function message_basic_tests(page) {
await common.log_in(page);
console.log("Sending messages");
await common.send_multiple_messages(page, [
{stream: "Verona", topic: "test", content: "verona test a"},
{stream: "Verona", topic: "test", content: "verona test b"},
{stream: "Verona", topic: "other topic", content: "verona other topic c"},
{recipient: "cordelia@zulip.com, hamlet@zulip.com", content: "group pm a"},
{recipient: "cordelia@zulip.com, hamlet@zulip.com", content: "group pm b"},
{recipient: "cordelia@zulip.com", content: "pm c"},
]);
await common.check_messages_sent(page, "zhome", [
["Verona > test", ["verona test a", "verona test b"]],
["Verona > other topic", ["verona other topic c"]],
["You and Cordelia Lear, King Hamlet", ["group pm a", "group pm b"]],
["You and Cordelia Lear", ["pm c"]],
]);
await common.log_out(page);
}
common.run_test(message_basic_tests);