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 #12615 from adobe/marcel/fix-tests
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
Marcel Gerber committed Jul 24, 2016
2 parents 7a5d99c + 6ba17d3 commit aa5bead
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/extensions/default/SVGCodeHints/unittests.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ define(function (require, exports, module) {
var hints = expectHints(SVGCodeHints.hintProvider);
verifyHints(hints, "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 always include transparent and currentColor and they should not have a swatch, but class no-swatch-margin", function () {
Expand Down
10 changes: 8 additions & 2 deletions test/spec/FindInFiles-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,7 @@ define(function (require, exports, module) {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-what").val("").trigger("input");
expect($("#replace-all").is(":disabled")).toBe(true);
});
});
Expand Down Expand Up @@ -2289,9 +2290,14 @@ define(function (require, exports, module) {
showSearchResults("foo", "bar");
runs(function () {
$(".disclosure-triangle").click();
expect($("#items").is(":style")).toBeFalsy();
expect($(".disclosure-triangle").hasClass("expanded")).toBeFalsy();
// Check that all results are hidden
expect($(".bottom-panel-table tr[data-file-index=0][data-match-index]:hidden").length).toEqual(7);
expect($(".bottom-panel-table tr[data-file-index=1][data-match-index]:hidden").length).toEqual(4);
$(".disclosure-triangle").click();
expect($("#items").is(":style")).toBeTruthy();
expect($(".disclosure-triangle").hasClass("expanded")).toBeTruthy();
expect($(".bottom-panel-table tr[data-file-index=0][data-match-index]:visible").length).toEqual(7);
expect($(".bottom-panel-table tr[data-file-index=1][data-match-index]:visible").length).toEqual(4);
});
});
});
Expand Down

0 comments on commit aa5bead

Please sign in to comment.