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

Commit

Permalink
Fix unit test that broke due to a side fix in PR #10413, and enhance …
Browse files Browse the repository at this point in the history
…tests

to verify that search tickmarks are rendered.

Also, bump up wait time in WorkingSetView-test that was failing sporadically.
The test had zero margin for error on the wait, which may be making it fragile.
  • Loading branch information
peterflynn committed Feb 10, 2015
1 parent 7faa51a commit 2a11d47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion test/spec/FindReplace-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ define(function (require, exports, module) {
});
}

// Verify number of tickmarks equals number of highlights
var tickmarks = tw$(".tickmark-track .tickmark", myEditor.getRootElement());
expect(tickmarks.length).toEqual(selections.length);

// Verify that editor UI doesn't have extra ranges left highlighted from earlier
// (note: this only works for text that's short enough to not get virtualized)
var lineDiv = tw$(".CodeMirror-lines .CodeMirror-code", myEditor.getRootElement());
Expand Down Expand Up @@ -504,7 +508,8 @@ define(function (require, exports, module) {
enterSearchText("b");

expectMatchIndex(0, 2430);
expectHighlightedMatches([]);
// When exceeding 2000 matches, tickmarks disabled and only the *current* editor highlight is shown
expectHighlightedMatches([], 1);
});

it("should find all case-insensitive matches with lowercase text", function () {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/WorkingSetView-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ define(function (require, exports, module) {
CommandManager.execute(Commands.FILE_RENAME);
});

waits(ProjectManager._RENDER_DEBOUNCE_TIME);
waits(ProjectManager._RENDER_DEBOUNCE_TIME + 50);

runs(function () {
expect($("#project-files-container ul input").val()).toBe(fileName);
Expand Down

0 comments on commit 2a11d47

Please sign in to comment.