Add casper tests to check that the subject/stream/recipient fields are populated when replying

(imported from commit 7a0337467c6e7a1ed3118e07d2b4ad904719e093)
This commit is contained in:
Kevin Mehall
2013-06-11 17:08:11 -04:00
parent b06c2f7ccf
commit 7363851561
2 changed files with 43 additions and 1 deletions

View File

@@ -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") {