mirror of https://github.com/zulip/zulip.git
tests: Move page console.log support into common.js
(imported from commit e875e67ad44ef10d9d84671a14a4d1755c0154df)
This commit is contained in:
parent
0263bace8a
commit
50ef0a6edb
|
@ -79,6 +79,15 @@ exports.then_log_out = function () {
|
|||
});
|
||||
};
|
||||
|
||||
exports.enable_page_console = function () {
|
||||
// Call this (after casper.start) to enable printing page-context
|
||||
// console.log (plus some CasperJS-specific messages) to the
|
||||
// terminal.
|
||||
casper.on('remote.message', function (msg) {
|
||||
casper.echo(msg);
|
||||
});
|
||||
};
|
||||
|
||||
exports.send_message = function (type, params) {
|
||||
casper.waitForSelector('#left_bar_compose_' + type + '_button_big', function () {
|
||||
casper.click('#left_bar_compose_' + type + '_button_big');
|
||||
|
|
|
@ -12,14 +12,6 @@ var utils = require('utils');
|
|||
|
||||
var common = require('../common.js').common;
|
||||
|
||||
// Uncomment this to get page-context console.log in the CasperJS output
|
||||
// (plus some CasperJS-specific messages)
|
||||
/*
|
||||
casper.on('remote.message', function (msg) {
|
||||
casper.echo(msg);
|
||||
});
|
||||
*/
|
||||
|
||||
common.start_and_log_in();
|
||||
|
||||
casper.then(function () {
|
||||
|
|
Loading…
Reference in New Issue