1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:37:58 +01:00

Add experimental Mozmill functional tests.

--HG--
extra : rebase_source : eb8095f9d17f9c97706f93f670dd880c2b56f050
This commit is contained in:
Doug Kearns
2011-01-25 22:17:52 +11:00
parent 685a0f5d30
commit 35e0ab9cf4
32 changed files with 8382 additions and 260 deletions

View File

@@ -0,0 +1,33 @@
var dactyllib = require("dactyl");
var setupModule = function (module) {
controller = mozmill.getBrowserController();
dactyl = new dactyllib.Controller(controller);
};
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: