mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-19 21:57:59 +01:00
command line machinery. It's orders of magnitude faster, on the one hand, but also runs the display machinery for all results, which may catch more errors. Errors in the command line completion machinery should be tested elsewhere. Fix some sidebar test bugs. Move dactyl.js and utils.js files out of sandboxes and into modules so we can pass XML objects in and out of them. --HG-- rename : common/tests/functional/dactyl.js => common/tests/functional/dactyl.jsm rename : common/tests/functional/utils.js => common/tests/functional/utils.jsm
38 lines
967 B
JavaScript
38 lines
967 B
JavaScript
var dactyllib = require("utils").module("dactyl");
|
|
|
|
var setupModule = function (module) {
|
|
controller = mozmill.getBrowserController();
|
|
dactyl = new dactyllib.Controller(controller);
|
|
};
|
|
|
|
var teardownModule = function (module) {
|
|
dactyl.teardown();
|
|
}
|
|
|
|
var teardownTest = function (test) {
|
|
dactyl.closeMessageWindow();
|
|
};
|
|
|
|
var testRunCommand_ExecutingOutputCommand_OutputDisplayed = function () {
|
|
const EXPECTED_OUTPUT = "foobar";
|
|
const COMMAND = "run echo " + EXPECTED_OUTPUT;
|
|
|
|
dactyl.runExCommand(COMMAND);
|
|
|
|
dactyl.assertMessageWindow(RegExp(EXPECTED_OUTPUT));
|
|
};
|
|
|
|
var testRunCommand_RepeatArg_LastCommandRepeated = function () {
|
|
const EXPECTED_OUTPUT = /foobar$/; // XXX
|
|
const COMMAND = "run echo 'foobar'";
|
|
const REPEAT_COMMAND = "run!";
|
|
|
|
dactyl.runExCommand(COMMAND);
|
|
dactyl.closeMessageWindow();
|
|
dactyl.runExCommand(REPEAT_COMMAND);
|
|
|
|
dactyl.assertMessageWindow(EXPECTED_OUTPUT);
|
|
};
|
|
|
|
// vim: sw=4 ts=8 et:
|