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.

puppeteer: Add 02-message-basic tests.

Dinesh1201ecf3325b
diff --git a/frontend_tests/puppeteer_tests/02-message-basics.js b/frontend_tests/puppeteer_tests/02-message-basics.js
new file mode 100644
index 00000000000..41248622156
--- /dev/null
+++ b/frontend_tests/puppeteer_tests/02-message-basics.js
@@ -0,0 +1,31 @@
+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: '[email protected], [email protected]', content: 'group pm a' },
+ { recipient: '[email protected], [email protected]', content: 'group pm b' },
+ { recipient: '[email protected]', 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);