1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 07:17:59 +01:00
Files
pentadactyl-pm/common/tests/functional/testVersionCommand.js
Doug Kearns 35e0ab9cf4 Add experimental Mozmill functional tests.
--HG--
extra : rebase_source : eb8095f9d17f9c97706f93f670dd880c2b56f050
2011-01-25 22:17:52 +11:00

35 lines
1.1 KiB
JavaScript

var dactyllib = require("dactyl");
var setupModule = function (module) {
controller = mozmill.getBrowserController();
dactyl = new dactyllib.Controller(controller);
};
var setupTest = function (test) {
dactyl.closeMessageWindow();
};
var testVersionCommand_NoArg_VersionStringDisplayed = function () {
const EXPECTED_OUTPUT = RegExp(dactyl.applicationName + ".+ (.+) running on:.+"); // XXX
dactyl.runExCommand("version");
dactyl.assertMessageWindow(EXPECTED_OUTPUT);
};
var testVersionCommand_BangArg_HostAppVersionPageDisplayed = function () {
const EXPECTED_URL = "about:";
const EXPECTED_TITLE = "About:";
const BLANK_PAGE_URL = "about:blank";
controller.open(BLANK_PAGE_URL);
controller.waitForPageLoad(controller.tabs.activeTab);
dactyl.runExCommand("version!");
controller.waitForPageLoad(controller.tabs.activeTab);
controller.assert(function () controller.tabs.activeTab.location.href === EXPECTED_URL);
controller.assert(function () controller.tabs.activeTab.title === EXPECTED_TITLE);
};
// vim: sw=4 ts=8 et: