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

Commit

Permalink
better way to wait
Browse files Browse the repository at this point in the history
  • Loading branch information
redmunds committed Apr 10, 2014
1 parent 2b8d7a0 commit 92d0cd7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/spec/FindReplace-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, describe, it, expect, beforeFirst, afterLast, beforeEach, afterEach, waits, waitsFor, waitsForDone, runs, window, jasmine */
/*global define, describe, it, expect, beforeFirst, afterLast, beforeEach, afterEach, waitsFor, waitsForDone, runs, window, jasmine */
/*unittests: FindReplace*/

define(function (require, exports, module) {
Expand Down Expand Up @@ -1695,7 +1695,9 @@ define(function (require, exports, module) {
executeSearch("callFoo");
});

waits(300); // .modal-bar close transition is 266ms
waitsFor(function () {
return ($(".modal-bar").length === 0);
}, "search bar close");

runs(function () {
var fileResults = FindInFiles._searchResults[filePath];
Expand All @@ -1714,7 +1716,9 @@ define(function (require, exports, module) {
executeSearch("abcdefghi");
});

waits(300); // .modal-bar close transition is 266ms
waitsFor(function () {
return (FindInFiles._searchResults);
}, "search complete");

runs(function () {
var result, resultFound = false;
Expand Down

0 comments on commit 92d0cd7

Please sign in to comment.