ember-source 1.13.1 → 1.13.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ember-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-template-compiler.js +552 -552
- data/dist/ember-testing.js +86 -86
- data/dist/ember.debug.js +1839 -1839
- data/dist/ember.js +1839 -1839
- data/dist/ember.min.js +17 -17
- data/dist/ember.prod.js +1749 -1749
- metadata +1 -1
data/dist/ember-testing.js
CHANGED
@@ -152,7 +152,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
152
152
|
its return value will be used as condition.
|
153
153
|
@public
|
154
154
|
*/
|
155
|
-
_emberMetalCore
|
155
|
+
_emberMetalCore["default"].assert = function (desc, test) {
|
156
156
|
var throwAssertion;
|
157
157
|
|
158
158
|
if (isPlainFunction(test)) {
|
@@ -162,7 +162,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
162
162
|
}
|
163
163
|
|
164
164
|
if (throwAssertion) {
|
165
|
-
throw new _emberMetalError
|
165
|
+
throw new _emberMetalError["default"]("Assertion Failed: " + desc);
|
166
166
|
}
|
167
167
|
};
|
168
168
|
|
@@ -176,11 +176,11 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
176
176
|
will be displayed.
|
177
177
|
@public
|
178
178
|
*/
|
179
|
-
_emberMetalCore
|
179
|
+
_emberMetalCore["default"].warn = function (message, test) {
|
180
180
|
if (!test) {
|
181
|
-
_emberMetalLogger
|
182
|
-
if ("trace" in _emberMetalLogger
|
183
|
-
_emberMetalLogger
|
181
|
+
_emberMetalLogger["default"].warn("WARNING: " + message);
|
182
|
+
if ("trace" in _emberMetalLogger["default"]) {
|
183
|
+
_emberMetalLogger["default"].trace();
|
184
184
|
}
|
185
185
|
}
|
186
186
|
};
|
@@ -197,8 +197,8 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
197
197
|
@param {String} message A debug message to display.
|
198
198
|
@public
|
199
199
|
*/
|
200
|
-
_emberMetalCore
|
201
|
-
_emberMetalLogger
|
200
|
+
_emberMetalCore["default"].debug = function (message) {
|
201
|
+
_emberMetalLogger["default"].debug("DEBUG: " + message);
|
202
202
|
};
|
203
203
|
|
204
204
|
/**
|
@@ -218,11 +218,11 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
218
218
|
The `id` should be namespaced by dots, e.g. "view.helper.select".
|
219
219
|
@public
|
220
220
|
*/
|
221
|
-
_emberMetalCore
|
222
|
-
if (_emberMetalCore
|
223
|
-
_emberDebugDeprecationManager
|
221
|
+
_emberMetalCore["default"].deprecate = function (message, test, options) {
|
222
|
+
if (_emberMetalCore["default"].ENV.RAISE_ON_DEPRECATION) {
|
223
|
+
_emberDebugDeprecationManager["default"].setDefaultLevel(_emberDebugDeprecationManager.deprecationLevels.RAISE);
|
224
224
|
}
|
225
|
-
if (_emberDebugDeprecationManager
|
225
|
+
if (_emberDebugDeprecationManager["default"].getLevel(options && options.id) === _emberDebugDeprecationManager.deprecationLevels.SILENCE) {
|
226
226
|
return;
|
227
227
|
}
|
228
228
|
|
@@ -242,8 +242,8 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
242
242
|
message = message + (" [deprecation id: " + options.id + "]");
|
243
243
|
}
|
244
244
|
|
245
|
-
if (_emberDebugDeprecationManager
|
246
|
-
throw new _emberMetalError
|
245
|
+
if (_emberDebugDeprecationManager["default"].getLevel(options && options.id) === _emberDebugDeprecationManager.deprecationLevels.RAISE) {
|
246
|
+
throw new _emberMetalError["default"](message);
|
247
247
|
}
|
248
248
|
|
249
249
|
var error;
|
@@ -256,13 +256,13 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
256
256
|
}
|
257
257
|
|
258
258
|
if (arguments.length === 3) {
|
259
|
-
_emberMetalCore
|
259
|
+
_emberMetalCore["default"].assert("options argument to Ember.deprecate should be an object", options && typeof options === "object");
|
260
260
|
if (options.url) {
|
261
261
|
message += " See " + options.url + " for more details.";
|
262
262
|
}
|
263
263
|
}
|
264
264
|
|
265
|
-
if (_emberMetalCore
|
265
|
+
if (_emberMetalCore["default"].LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
|
266
266
|
var stack;
|
267
267
|
var stackStr = "";
|
268
268
|
|
@@ -279,7 +279,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
279
279
|
message = message + stackStr;
|
280
280
|
}
|
281
281
|
|
282
|
-
_emberMetalLogger
|
282
|
+
_emberMetalLogger["default"].warn("DEPRECATION: " + message);
|
283
283
|
};
|
284
284
|
|
285
285
|
/**
|
@@ -301,9 +301,9 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
301
301
|
@return {Function} a new function that wrapped the original function with a deprecation warning
|
302
302
|
@private
|
303
303
|
*/
|
304
|
-
_emberMetalCore
|
304
|
+
_emberMetalCore["default"].deprecateFunc = function (message, func) {
|
305
305
|
return function () {
|
306
|
-
_emberMetalCore
|
306
|
+
_emberMetalCore["default"].deprecate(message);
|
307
307
|
return func.apply(this, arguments);
|
308
308
|
};
|
309
309
|
};
|
@@ -327,7 +327,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
327
327
|
@since 1.5.0
|
328
328
|
@public
|
329
329
|
*/
|
330
|
-
_emberMetalCore
|
330
|
+
_emberMetalCore["default"].runInDebug = function (func) {
|
331
331
|
func();
|
332
332
|
};
|
333
333
|
|
@@ -344,32 +344,32 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
344
344
|
|
345
345
|
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
|
346
346
|
if (featuresWereStripped) {
|
347
|
-
_emberMetalCore
|
348
|
-
_emberMetalCore
|
347
|
+
_emberMetalCore["default"].warn("Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.", !_emberMetalCore["default"].ENV.ENABLE_ALL_FEATURES);
|
348
|
+
_emberMetalCore["default"].warn("Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.", !_emberMetalCore["default"].ENV.ENABLE_OPTIONAL_FEATURES);
|
349
349
|
|
350
350
|
for (var key in FEATURES) {
|
351
351
|
if (FEATURES.hasOwnProperty(key) && key !== "isEnabled") {
|
352
|
-
_emberMetalCore
|
352
|
+
_emberMetalCore["default"].warn("FEATURE[\"" + key + "\"] is set as enabled, but FEATURE flags are only available in canary builds.", !FEATURES[key]);
|
353
353
|
}
|
354
354
|
}
|
355
355
|
}
|
356
356
|
}
|
357
357
|
|
358
|
-
if (!_emberMetalCore
|
358
|
+
if (!_emberMetalCore["default"].testing) {
|
359
359
|
// Complain if they're using FEATURE flags in builds other than canary
|
360
|
-
_emberMetalCore
|
360
|
+
_emberMetalCore["default"].FEATURES["features-stripped-test"] = true;
|
361
361
|
var featuresWereStripped = true;
|
362
362
|
|
363
|
-
if (_emberMetalCore
|
363
|
+
if (_emberMetalCore["default"].FEATURES.isEnabled("features-stripped-test")) {
|
364
364
|
featuresWereStripped = false;
|
365
365
|
}
|
366
366
|
|
367
|
-
delete _emberMetalCore
|
368
|
-
_warnIfUsingStrippedFeatureFlags(_emberMetalCore
|
367
|
+
delete _emberMetalCore["default"].FEATURES["features-stripped-test"];
|
368
|
+
_warnIfUsingStrippedFeatureFlags(_emberMetalCore["default"].ENV.FEATURES, featuresWereStripped);
|
369
369
|
|
370
370
|
// Inform the developer about the Ember Inspector if not installed.
|
371
|
-
var isFirefox = _emberMetalEnvironment
|
372
|
-
var isChrome = _emberMetalEnvironment
|
371
|
+
var isFirefox = _emberMetalEnvironment["default"].isFirefox;
|
372
|
+
var isChrome = _emberMetalEnvironment["default"].isChrome;
|
373
373
|
|
374
374
|
if (typeof window !== "undefined" && (isFirefox || isChrome) && window.addEventListener) {
|
375
375
|
window.addEventListener("load", function () {
|
@@ -382,15 +382,15 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
382
382
|
downloadURL = "https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/";
|
383
383
|
}
|
384
384
|
|
385
|
-
_emberMetalCore
|
385
|
+
_emberMetalCore["default"].debug("For more advanced debugging, install the Ember Inspector from " + downloadURL);
|
386
386
|
}
|
387
387
|
}, false);
|
388
388
|
}
|
389
389
|
}
|
390
390
|
|
391
|
-
_emberMetalCore
|
391
|
+
_emberMetalCore["default"].Debug = {
|
392
392
|
_addDeprecationLevel: function (id, level) {
|
393
|
-
_emberDebugDeprecationManager
|
393
|
+
_emberDebugDeprecationManager["default"].setLevel(id, level);
|
394
394
|
},
|
395
395
|
_deprecationLevels: _emberDebugDeprecationManager.deprecationLevels
|
396
396
|
};
|
@@ -406,7 +406,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
406
406
|
var runningNonEmberDebugJS = false;
|
407
407
|
exports.runningNonEmberDebugJS = runningNonEmberDebugJS;
|
408
408
|
if (runningNonEmberDebugJS) {
|
409
|
-
_emberMetalCore
|
409
|
+
_emberMetalCore["default"].warn("Please use `ember.debug.js` instead of `ember.js` for development and debugging.");
|
410
410
|
}
|
411
411
|
});
|
412
412
|
/*global __fail__*/
|
@@ -418,9 +418,9 @@ enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary',
|
|
418
418
|
};
|
419
419
|
|
420
420
|
exports.deprecationLevels = deprecationLevels;
|
421
|
-
exports
|
421
|
+
exports["default"] = {
|
422
422
|
defaultLevel: deprecationLevels.LOG,
|
423
|
-
individualLevels: (0, _emberMetalDictionary
|
423
|
+
individualLevels: (0, _emberMetalDictionary["default"])(null),
|
424
424
|
setDefaultLevel: function (level) {
|
425
425
|
this.defaultLevel = level;
|
426
426
|
},
|
@@ -444,10 +444,10 @@ enifed("ember-testing", ["exports", "ember-metal/core", "ember-testing/initializ
|
|
444
444
|
@submodule ember-testing
|
445
445
|
*/
|
446
446
|
|
447
|
-
_emberMetalCore
|
448
|
-
_emberMetalCore
|
449
|
-
_emberMetalCore
|
450
|
-
_emberMetalCore
|
447
|
+
_emberMetalCore["default"].Test = _emberTestingTest["default"];
|
448
|
+
_emberMetalCore["default"].Test.Adapter = _emberTestingAdaptersAdapter["default"];
|
449
|
+
_emberMetalCore["default"].Test.QUnitAdapter = _emberTestingAdaptersQunit["default"];
|
450
|
+
_emberMetalCore["default"].setupForTesting = _emberTestingSetup_for_testing["default"];
|
451
451
|
});
|
452
452
|
// to setup initializer
|
453
453
|
// to handle various edge cases
|
@@ -470,7 +470,7 @@ enifed("ember-testing/adapters/adapter", ["exports", "ember-runtime/system/objec
|
|
470
470
|
@namespace Ember.Test
|
471
471
|
@public
|
472
472
|
*/
|
473
|
-
var Adapter = _emberRuntimeSystemObject
|
473
|
+
var Adapter = _emberRuntimeSystemObject["default"].extend({
|
474
474
|
/**
|
475
475
|
This callback will be called whenever an async operation is about to start.
|
476
476
|
Override this to call your framework's methods that handle async
|
@@ -506,7 +506,7 @@ enifed("ember-testing/adapters/adapter", ["exports", "ember-runtime/system/objec
|
|
506
506
|
}
|
507
507
|
});
|
508
508
|
|
509
|
-
exports
|
509
|
+
exports["default"] = Adapter;
|
510
510
|
});
|
511
511
|
enifed("ember-testing/adapters/qunit", ["exports", "ember-testing/adapters/adapter", "ember-metal/utils"], function (exports, _emberTestingAdaptersAdapter, _emberMetalUtils) {
|
512
512
|
|
@@ -519,7 +519,7 @@ enifed("ember-testing/adapters/qunit", ["exports", "ember-testing/adapters/adapt
|
|
519
519
|
@extends Ember.Test.Adapter
|
520
520
|
@public
|
521
521
|
*/
|
522
|
-
exports
|
522
|
+
exports["default"] = _emberTestingAdaptersAdapter["default"].extend({
|
523
523
|
asyncStart: function () {
|
524
524
|
QUnit.stop();
|
525
525
|
},
|
@@ -538,8 +538,8 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
538
538
|
@submodule ember-testing
|
539
539
|
*/
|
540
540
|
|
541
|
-
var helper = _emberTestingTest
|
542
|
-
var asyncHelper = _emberTestingTest
|
541
|
+
var helper = _emberTestingTest["default"].registerHelper;
|
542
|
+
var asyncHelper = _emberTestingTest["default"].registerAsyncHelper;
|
543
543
|
|
544
544
|
function currentRouteName(app) {
|
545
545
|
var appController = app.__container__.lookup("controller:application");
|
@@ -560,15 +560,15 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
560
560
|
}
|
561
561
|
|
562
562
|
function pauseTest() {
|
563
|
-
_emberTestingTest
|
564
|
-
return new _emberMetalCore
|
563
|
+
_emberTestingTest["default"].adapter.asyncStart();
|
564
|
+
return new _emberMetalCore["default"].RSVP.Promise(function () {}, "TestAdapter paused promise");
|
565
565
|
}
|
566
566
|
|
567
567
|
function focus(el) {
|
568
568
|
if (el && el.is(":input, [contenteditable=true]")) {
|
569
569
|
var type = el.prop("type");
|
570
570
|
if (type !== "checkbox" && type !== "radio" && type !== "hidden") {
|
571
|
-
(0, _emberMetalRun_loop
|
571
|
+
(0, _emberMetalRun_loop["default"])(el, function () {
|
572
572
|
// Firefox does not trigger the `focusin` event if the window
|
573
573
|
// does not have focus. If the document doesn't have focus just
|
574
574
|
// use trigger('focusin') instead.
|
@@ -590,13 +590,13 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
590
590
|
router.location.setURL(url);
|
591
591
|
|
592
592
|
if (shouldHandleURL) {
|
593
|
-
(0, _emberMetalRun_loop
|
593
|
+
(0, _emberMetalRun_loop["default"])(app.__deprecatedInstance__, "handleURL", url);
|
594
594
|
}
|
595
595
|
});
|
596
596
|
|
597
597
|
if (app._readinessDeferrals > 0) {
|
598
598
|
router["initialURL"] = url;
|
599
|
-
(0, _emberMetalRun_loop
|
599
|
+
(0, _emberMetalRun_loop["default"])(app, "advanceReadiness");
|
600
600
|
delete router["initialURL"];
|
601
601
|
} else {
|
602
602
|
shouldHandleURL = true;
|
@@ -607,12 +607,12 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
607
607
|
|
608
608
|
function click(app, selector, context) {
|
609
609
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
610
|
-
(0, _emberMetalRun_loop
|
610
|
+
(0, _emberMetalRun_loop["default"])($el, "mousedown");
|
611
611
|
|
612
612
|
focus($el);
|
613
613
|
|
614
|
-
(0, _emberMetalRun_loop
|
615
|
-
(0, _emberMetalRun_loop
|
614
|
+
(0, _emberMetalRun_loop["default"])($el, "mouseup");
|
615
|
+
(0, _emberMetalRun_loop["default"])($el, "click");
|
616
616
|
|
617
617
|
return app.testHelpers.wait();
|
618
618
|
}
|
@@ -621,7 +621,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
621
621
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
622
622
|
var type = $el.prop("type");
|
623
623
|
|
624
|
-
_emberMetalCore
|
624
|
+
_emberMetalCore["default"].assert("To check '" + selector + "', the input must be a checkbox", type === "checkbox");
|
625
625
|
|
626
626
|
if (!$el.prop("checked")) {
|
627
627
|
app.testHelpers.click(selector, context);
|
@@ -634,7 +634,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
634
634
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
635
635
|
var type = $el.prop("type");
|
636
636
|
|
637
|
-
_emberMetalCore
|
637
|
+
_emberMetalCore["default"].assert("To uncheck '" + selector + "', the input must be a checkbox", type === "checkbox");
|
638
638
|
|
639
639
|
if ($el.prop("checked")) {
|
640
640
|
app.testHelpers.click(selector, context);
|
@@ -676,9 +676,9 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
676
676
|
|
677
677
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
678
678
|
|
679
|
-
var event = _emberViewsSystemJquery
|
679
|
+
var event = _emberViewsSystemJquery["default"].Event(type, options);
|
680
680
|
|
681
|
-
(0, _emberMetalRun_loop
|
681
|
+
(0, _emberMetalRun_loop["default"])($el, "trigger", event);
|
682
682
|
|
683
683
|
return app.testHelpers.wait();
|
684
684
|
}
|
@@ -707,7 +707,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
707
707
|
}
|
708
708
|
$el = app.testHelpers.findWithAssert(selector, context);
|
709
709
|
focus($el);
|
710
|
-
(0, _emberMetalRun_loop
|
710
|
+
(0, _emberMetalRun_loop["default"])(function () {
|
711
711
|
$el.val(text).change();
|
712
712
|
});
|
713
713
|
return app.testHelpers.wait();
|
@@ -716,7 +716,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
716
716
|
function findWithAssert(app, selector, context) {
|
717
717
|
var $el = app.testHelpers.find(selector, context);
|
718
718
|
if ($el.length === 0) {
|
719
|
-
throw new _emberMetalError
|
719
|
+
throw new _emberMetalError["default"]("Element " + selector + " not found.");
|
720
720
|
}
|
721
721
|
return $el;
|
722
722
|
}
|
@@ -734,7 +734,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
734
734
|
}
|
735
735
|
|
736
736
|
function wait(app, value) {
|
737
|
-
return new _emberRuntimeExtRsvp
|
737
|
+
return new _emberRuntimeExtRsvp["default"].Promise(function (resolve) {
|
738
738
|
// Every 10ms, poll for the async thing to have finished
|
739
739
|
var watcher = setInterval(function () {
|
740
740
|
var router = app.__container__.lookup("router:main");
|
@@ -746,15 +746,15 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
746
746
|
}
|
747
747
|
|
748
748
|
// 2. If there are pending Ajax requests, keep polling
|
749
|
-
if (_emberTestingTest
|
749
|
+
if (_emberTestingTest["default"].pendingAjaxRequests) {
|
750
750
|
return;
|
751
751
|
}
|
752
752
|
|
753
753
|
// 3. If there are scheduled timers or we are inside of a run loop, keep polling
|
754
|
-
if (_emberMetalRun_loop
|
754
|
+
if (_emberMetalRun_loop["default"].hasScheduledTimers() || _emberMetalRun_loop["default"].currentRunLoop) {
|
755
755
|
return;
|
756
756
|
}
|
757
|
-
if (_emberTestingTest
|
757
|
+
if (_emberTestingTest["default"].waiters && _emberTestingTest["default"].waiters.any(function (waiter) {
|
758
758
|
var context = waiter[0];
|
759
759
|
var callback = waiter[1];
|
760
760
|
return !callback.call(context);
|
@@ -765,7 +765,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
765
765
|
clearInterval(watcher);
|
766
766
|
|
767
767
|
// Synchronously resolve the promise
|
768
|
-
(0, _emberMetalRun_loop
|
768
|
+
(0, _emberMetalRun_loop["default"])(null, resolve, value);
|
769
769
|
}, 10);
|
770
770
|
});
|
771
771
|
}
|
@@ -809,7 +809,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
809
809
|
*/
|
810
810
|
asyncHelper("click", click);
|
811
811
|
|
812
|
-
if (_emberMetalCore
|
812
|
+
if (_emberMetalCore["default"].FEATURES.isEnabled("ember-testing-checkbox-helpers")) {
|
813
813
|
/**
|
814
814
|
Checks a checkbox. Ensures the presence of the `checked` attribute
|
815
815
|
Example:
|
@@ -1071,7 +1071,7 @@ enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load
|
|
1071
1071
|
});
|
1072
1072
|
});
|
1073
1073
|
enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember-testing/adapters/qunit", "ember-views/system/jquery"], function (exports, _emberMetalCore, _emberTestingAdaptersQunit, _emberViewsSystemJquery) {
|
1074
|
-
exports
|
1074
|
+
exports["default"] = setupForTesting;
|
1075
1075
|
|
1076
1076
|
var Test, requests;
|
1077
1077
|
|
@@ -1107,20 +1107,20 @@ enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember
|
|
1107
1107
|
Test = requireModule("ember-testing/test")["default"];
|
1108
1108
|
}
|
1109
1109
|
|
1110
|
-
_emberMetalCore
|
1110
|
+
_emberMetalCore["default"].testing = true;
|
1111
1111
|
|
1112
1112
|
// if adapter is not manually set default to QUnit
|
1113
1113
|
if (!Test.adapter) {
|
1114
|
-
Test.adapter = _emberTestingAdaptersQunit
|
1114
|
+
Test.adapter = _emberTestingAdaptersQunit["default"].create();
|
1115
1115
|
}
|
1116
1116
|
|
1117
1117
|
requests = [];
|
1118
1118
|
Test.pendingAjaxRequests = requests.length;
|
1119
1119
|
|
1120
|
-
(0, _emberViewsSystemJquery
|
1121
|
-
(0, _emberViewsSystemJquery
|
1122
|
-
(0, _emberViewsSystemJquery
|
1123
|
-
(0, _emberViewsSystemJquery
|
1120
|
+
(0, _emberViewsSystemJquery["default"])(document).off("ajaxSend", incrementAjaxPendingRequests);
|
1121
|
+
(0, _emberViewsSystemJquery["default"])(document).off("ajaxComplete", decrementAjaxPendingRequests);
|
1122
|
+
(0, _emberViewsSystemJquery["default"])(document).on("ajaxSend", incrementAjaxPendingRequests);
|
1123
|
+
(0, _emberViewsSystemJquery["default"])(document).on("ajaxComplete", decrementAjaxPendingRequests);
|
1124
1124
|
}
|
1125
1125
|
});
|
1126
1126
|
|
@@ -1132,7 +1132,7 @@ enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/sys
|
|
1132
1132
|
@submodule ember-testing
|
1133
1133
|
*/
|
1134
1134
|
|
1135
|
-
var $ = _emberViewsSystemJquery
|
1135
|
+
var $ = _emberViewsSystemJquery["default"];
|
1136
1136
|
|
1137
1137
|
/**
|
1138
1138
|
This method creates a checkbox and triggers the click event to fire the
|
@@ -1146,7 +1146,7 @@ enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/sys
|
|
1146
1146
|
$("<input type=\"checkbox\">").css({ position: "absolute", left: "-1000px", top: "-1000px" }).appendTo("body").on("click", handler).trigger("click").remove();
|
1147
1147
|
}
|
1148
1148
|
|
1149
|
-
if (_emberMetalEnvironment
|
1149
|
+
if (_emberMetalEnvironment["default"].hasDOM) {
|
1150
1150
|
$(function () {
|
1151
1151
|
/*
|
1152
1152
|
Determine whether a checkbox checked using jQuery's "click" method will have
|
@@ -1171,7 +1171,7 @@ enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/sys
|
|
1171
1171
|
|
1172
1172
|
// Try again to verify that the patch took effect or blow up.
|
1173
1173
|
testCheckboxClick(function () {
|
1174
|
-
_emberMetalCore
|
1174
|
+
_emberMetalCore["default"].warn("clicked checkboxes should be checked! the jQuery patch didn't work", this.checked);
|
1175
1175
|
});
|
1176
1176
|
});
|
1177
1177
|
}
|
@@ -1387,7 +1387,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1387
1387
|
context = null;
|
1388
1388
|
}
|
1389
1389
|
if (!this.waiters) {
|
1390
|
-
this.waiters = _emberMetalCore
|
1390
|
+
this.waiters = _emberMetalCore["default"].A();
|
1391
1391
|
}
|
1392
1392
|
this.waiters.push([context, callback]);
|
1393
1393
|
},
|
@@ -1408,7 +1408,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1408
1408
|
callback = context;
|
1409
1409
|
context = null;
|
1410
1410
|
}
|
1411
|
-
this.waiters = _emberMetalCore
|
1411
|
+
this.waiters = _emberMetalCore["default"].A(this.waiters.filter(function (elt) {
|
1412
1412
|
return !(elt[0] === context && elt[1] === callback);
|
1413
1413
|
}));
|
1414
1414
|
}
|
@@ -1445,21 +1445,21 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1445
1445
|
Test.adapter.asyncStart();
|
1446
1446
|
return lastPromise.then(function () {
|
1447
1447
|
return fn.apply(app, args);
|
1448
|
-
})
|
1448
|
+
})["finally"](function () {
|
1449
1449
|
Test.adapter.asyncEnd();
|
1450
1450
|
});
|
1451
1451
|
};
|
1452
1452
|
}
|
1453
1453
|
|
1454
1454
|
function run(fn) {
|
1455
|
-
if (!_emberMetalRun_loop
|
1456
|
-
return (0, _emberMetalRun_loop
|
1455
|
+
if (!_emberMetalRun_loop["default"].currentRunLoop) {
|
1456
|
+
return (0, _emberMetalRun_loop["default"])(fn);
|
1457
1457
|
} else {
|
1458
1458
|
return fn();
|
1459
1459
|
}
|
1460
1460
|
}
|
1461
1461
|
|
1462
|
-
_emberApplicationSystemApplication
|
1462
|
+
_emberApplicationSystemApplication["default"].reopen({
|
1463
1463
|
/**
|
1464
1464
|
This property contains the testing helpers for the current application. These
|
1465
1465
|
are created once you call `injectTestHelpers` on your `Ember.Application`
|
@@ -1511,7 +1511,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1511
1511
|
@public
|
1512
1512
|
*/
|
1513
1513
|
setupForTesting: function () {
|
1514
|
-
(0, _emberTestingSetup_for_testing
|
1514
|
+
(0, _emberTestingSetup_for_testing["default"])();
|
1515
1515
|
|
1516
1516
|
this.testing = true;
|
1517
1517
|
|
@@ -1608,17 +1608,17 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1608
1608
|
}
|
1609
1609
|
|
1610
1610
|
Test.Promise = function () {
|
1611
|
-
_emberRuntimeExtRsvp
|
1611
|
+
_emberRuntimeExtRsvp["default"].Promise.apply(this, arguments);
|
1612
1612
|
Test.lastPromise = this;
|
1613
1613
|
};
|
1614
1614
|
|
1615
|
-
Test.Promise.prototype = (0, _emberMetalPlatformCreate
|
1615
|
+
Test.Promise.prototype = (0, _emberMetalPlatformCreate["default"])(_emberRuntimeExtRsvp["default"].Promise.prototype);
|
1616
1616
|
Test.Promise.prototype.constructor = Test.Promise;
|
1617
1617
|
Test.Promise.resolve = Test.resolve;
|
1618
1618
|
|
1619
1619
|
// Patch `then` to isolate async methods
|
1620
1620
|
// specifically `Ember.Test.lastPromise`
|
1621
|
-
var originalThen = _emberRuntimeExtRsvp
|
1621
|
+
var originalThen = _emberRuntimeExtRsvp["default"].Promise.prototype.then;
|
1622
1622
|
Test.Promise.prototype.then = function (onSuccess, onFailure) {
|
1623
1623
|
return originalThen.call(this, function (val) {
|
1624
1624
|
return isolate(onSuccess, val);
|
@@ -1656,7 +1656,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1656
1656
|
}
|
1657
1657
|
}
|
1658
1658
|
|
1659
|
-
exports
|
1659
|
+
exports["default"] = Test;
|
1660
1660
|
});
|
1661
1661
|
requireModule("ember-testing");
|
1662
1662
|
|