Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1566 from adobe/nj/fix-livedev-tests
Browse files Browse the repository at this point in the history
Fix LiveDevelopment unit tests so they don't pop up the initial info dialog
  • Loading branch information
redmunds committed Sep 6, 2012
2 parents 52969c9 + ae7a4fb commit 0cdc538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/LiveDevelopment/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ define(function main(require, exports, module) {
CommandManager = require("command/CommandManager"),
PreferencesManager = require("preferences/PreferencesManager"),
Dialogs = require("widgets/Dialogs"),
UrlParams = require("utils/UrlParams").UrlParams,
Strings = require("strings");

var PREFERENCES_KEY = "com.adobe.brackets.live-development";
var prefs;
var params = new UrlParams();
var config = {
experimental: false, // enable experimental features
debug: true, // enable debug output and helpers
Expand Down Expand Up @@ -118,7 +120,7 @@ define(function main(require, exports, module) {
LiveDevelopment.close();
// TODO Ty: when checkmark support lands, remove checkmark
} else {
if (!prefs.getValue("afterFirstLaunch")) {
if (!params.get("skipLiveDevelopmentInfo") && !prefs.getValue("afterFirstLaunch")) {
prefs.setValue("afterFirstLaunch", "true");
Dialogs.showModalDialog(
Dialogs.DIALOG_ID_INFO,
Expand Down Expand Up @@ -183,6 +185,7 @@ define(function main(require, exports, module) {
/** Initialize LiveDevelopment */
function init() {
prefs = PreferencesManager.getPreferenceStorage(PREFERENCES_KEY);
params.parse();

Inspector.init(config);
LiveDevelopment.init(config);
Expand Down
3 changes: 3 additions & 0 deletions test/spec/SpecRunnerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ define(function (require, exports, module) {
// disable loading of sample project
params.put("skipSampleProjectLoad", true);

// disable initial dialog for live development
params.put("skipLiveDevelopmentInfo", true);

_testWindow = window.open(getBracketsSourceRoot() + "/index.html?" + params.toString(), "_blank", optionsStr);

_testWindow.executeCommand = function executeCommand(cmd, args) {
Expand Down

0 comments on commit 0cdc538

Please sign in to comment.