2020-07-15 01:29:15 +02:00
|
|
|
const common = require("../puppeteer_lib/common");
|
2020-06-12 17:57:02 +02:00
|
|
|
|
|
|
|
async function message_basic_tests(page) {
|
|
|
|
await common.log_in(page);
|
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
console.log("Sending messages");
|
2020-06-12 17:57:02 +02:00
|
|
|
await common.send_multiple_messages(page, [
|
2020-07-16 22:40:18 +02:00
|
|
|
{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"},
|
2020-06-12 17:57:02 +02:00
|
|
|
]);
|
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
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"]],
|
2020-06-16 20:21:28 +02:00
|
|
|
]);
|
2020-06-12 17:57:02 +02:00
|
|
|
|
|
|
|
await common.log_out(page);
|
|
|
|
}
|
|
|
|
|
|
|
|
common.run_test(message_basic_tests);
|