mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
Add casper tests to check that the subject/stream/recipient fields are populated when replying
(imported from commit 7a0337467c6e7a1ed3118e07d2b4ad904719e093)
This commit is contained in:
@@ -88,6 +88,17 @@ exports.enable_page_console = function () {
|
||||
});
|
||||
};
|
||||
|
||||
exports.check_form = function (form_selector, expected, test_name) {
|
||||
var values = casper.getFormValues(form_selector);
|
||||
var k;
|
||||
for (k in expected) {
|
||||
if (expected.hasOwnProperty(k)) {
|
||||
casper.test.assertEqual(values[k], expected[k],
|
||||
test_name ? (test_name + ": " + k) : undefined);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.send_message = function (type, params) {
|
||||
casper.waitForSelector('#new_message_content', function () {
|
||||
if(type === "stream") {
|
||||
|
||||
Reference in New Issue
Block a user