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

Commit 97c3a4c

Browse files
committed
Merge pull request #10567 from adobe/pflynn/fix-unit-test
Fix unit test that broke due to Find highlighting fix in PR #10413
2 parents c1222f7 + 2a11d47 commit 97c3a4c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/spec/FindReplace-test.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ define(function (require, exports, module) {
352352
});
353353
}
354354

355+
// Verify number of tickmarks equals number of highlights
356+
var tickmarks = tw$(".tickmark-track .tickmark", myEditor.getRootElement());
357+
expect(tickmarks.length).toEqual(selections.length);
358+
355359
// Verify that editor UI doesn't have extra ranges left highlighted from earlier
356360
// (note: this only works for text that's short enough to not get virtualized)
357361
var lineDiv = tw$(".CodeMirror-lines .CodeMirror-code", myEditor.getRootElement());
@@ -504,7 +508,8 @@ define(function (require, exports, module) {
504508
enterSearchText("b");
505509

506510
expectMatchIndex(0, 2430);
507-
expectHighlightedMatches([]);
511+
// When exceeding 2000 matches, tickmarks disabled and only the *current* editor highlight is shown
512+
expectHighlightedMatches([], 1);
508513
});
509514

510515
it("should find all case-insensitive matches with lowercase text", function () {

test/spec/WorkingSetView-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ define(function (require, exports, module) {
269269
CommandManager.execute(Commands.FILE_RENAME);
270270
});
271271

272-
waits(ProjectManager._RENDER_DEBOUNCE_TIME);
272+
waits(ProjectManager._RENDER_DEBOUNCE_TIME + 50);
273273

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

0 commit comments

Comments
 (0)