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 #12437 from adobe/marcel/test-fixes
Browse files Browse the repository at this point in the history
Some unit test fixes
  • Loading branch information
nethip committed May 20, 2016
2 parents 2a4b491 + bc00259 commit c8a403b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/extensibility/ExtensionManagerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ define(function (require, exports, module) {
InstallExtensionDialog = require("extensibility/InstallExtensionDialog"),
LocalizationUtils = require("utils/LocalizationUtils"),
LanguageManager = require("language/LanguageManager"),
itemTemplate = require("text!htmlContent/extension-manager-view-item.html"),
Mustache = require("thirdparty/mustache/mustache");
Mustache = require("thirdparty/mustache/mustache"),
PathUtils = require("thirdparty/path-utils/path-utils"),
itemTemplate = require("text!htmlContent/extension-manager-view-item.html");


/**
* Create a detached link element, so that we can use it later to extract url details like 'protocol'
Expand Down
4 changes: 3 additions & 1 deletion src/extensions/default/CSSCodeHints/unittests.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,9 @@ define(function (require, exports, module) {
var hints = expectHints(CSSCodeHints.cssPropHintProvider, undefined, true).hints;
expect(hints[0].text()).toBe("aliceblue"); // first hint should be aliceblue
expect(hints[0].find(".color-swatch").length).toBe(1);
expect(hints[0].find(".color-swatch").css("backgroundColor")).toBe("rgb(240, 248, 255)");
// CEF 2623 will output "aliceblue" whereas earlier versions give "rgb(240, 248, 255)",
// so we need this ugly hack to make sure this test passes on both
expect(hints[0].find(".color-swatch").css("backgroundColor")).toMatch(/^rgb\(240, 248, 255\)$|aliceblue/);
});

it("should filter out color names appropriately", function () {
Expand Down
4 changes: 2 additions & 2 deletions test/spec/ProjectModel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ define(function (require, exports, module) {
it("adjusts the selection if a parent folder is renamed", function () {
spyOn(model, "_renameItem").andReturn(new $.Deferred().resolve().promise());
model.setSelected("/foo/afile.js");
model.startRename("/foo");
model.startRename("/foo/");
model.setRenameValue("bar");
model.performRename();
expect(model._selections.selected).toBe("/bar/afile.js");
Expand All @@ -761,7 +761,7 @@ define(function (require, exports, module) {
it("does not adjust the selection if renaming a parent folder fails", function () {
spyOn(model, "_renameItem").andReturn(new $.Deferred().reject().promise());
model.setSelected("/foo/afile.js");
model.startRename("/foo");
model.startRename("/foo/");
model.setRenameValue("bar");
model.performRename();
expect(model._selections.selected).toBe("/foo/afile.js");
Expand Down

0 comments on commit c8a403b

Please sign in to comment.