ember-source 2.9.0.beta.5 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.9.0-beta.5
9
+ * @version 2.9.0
10
10
  */
11
11
 
12
12
  var enifed, requireModule, require, Ember;
@@ -112,85 +112,12 @@ var mainContext = this;
112
112
  }
113
113
  })();
114
114
 
115
- var babelHelpers;
116
-
117
- function classCallCheck(instance, Constructor) {
118
- if (!(instance instanceof Constructor)) {
119
- throw new TypeError('Cannot call a class as a function');
120
- }
121
- }
122
-
123
- function inherits(subClass, superClass) {
124
- if (typeof superClass !== 'function' && superClass !== null) {
125
- throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
126
- }
127
-
128
- subClass.prototype = Object.create(superClass && superClass.prototype, {
129
- constructor: {
130
- value: subClass,
131
- enumerable: false,
132
- writable: true,
133
- configurable: true
134
- }
135
- });
136
-
137
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : defaults(subClass, superClass);
138
- }
139
-
140
- function taggedTemplateLiteralLoose(strings, raw) {
141
- strings.raw = raw;
142
- return strings;
143
- }
144
-
145
- function defineProperties(target, props) {
146
- for (var i = 0; i < props.length; i++) {
147
- var descriptor = props[i];
148
- descriptor.enumerable = descriptor.enumerable || false;
149
- descriptor.configurable = true;
150
- if ('value' in descriptor) descriptor.writable = true;
151
- Object.defineProperty(target, descriptor.key, descriptor);
152
- }
153
- }
154
-
155
- function createClass(Constructor, protoProps, staticProps) {
156
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
157
- if (staticProps) defineProperties(Constructor, staticProps);
158
- return Constructor;
159
- }
160
-
161
- function interopExportWildcard(obj, defaults) {
162
- var newObj = defaults({}, obj);
163
- delete newObj['default'];
164
- return newObj;
165
- }
166
-
167
- function defaults(obj, defaults) {
168
- var keys = Object.getOwnPropertyNames(defaults);
169
- for (var i = 0; i < keys.length; i++) {
170
- var key = keys[i];
171
- var value = Object.getOwnPropertyDescriptor(defaults, key);
172
- if (value && value.configurable && obj[key] === undefined) {
173
- Object.defineProperty(obj, key, value);
174
- }
175
- }
176
- return obj;
177
- }
178
-
179
- babelHelpers = {
180
- classCallCheck: classCallCheck,
181
- inherits: inherits,
182
- taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
183
- slice: Array.prototype.slice,
184
- createClass: createClass,
185
- interopExportWildcard: interopExportWildcard,
186
- defaults: defaults
187
- };
188
-
189
- enifed('ember-debug/deprecate', ['exports', 'ember-metal', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports, _emberMetal, _emberConsole, _emberEnvironment, _emberDebugHandlers) {
115
+ enifed('ember-debug/deprecate', ['exports', 'ember-metal/error', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports, _emberMetalError, _emberConsole, _emberEnvironment, _emberDebugHandlers) {
190
116
  /*global __fail__*/
191
117
 
192
118
  'use strict';
193
119
 
120
+ var _slice = Array.prototype.slice;
194
121
  exports.registerHandler = registerHandler;
195
122
  exports.default = deprecate;
196
123
 
@@ -265,7 +192,7 @@ enifed('ember-debug/deprecate', ['exports', 'ember-metal', 'ember-console', 'emb
265
192
  if (_emberEnvironment.ENV.RAISE_ON_DEPRECATION) {
266
193
  var updatedMessage = formatMessage(message);
267
194
 
268
- throw new _emberMetal.Error(updatedMessage);
195
+ throw new _emberMetalError.default(updatedMessage);
269
196
  } else {
270
197
  next.apply(undefined, arguments);
271
198
  }
@@ -331,7 +258,7 @@ enifed('ember-debug/deprecate', ['exports', 'ember-metal', 'ember-console', 'emb
331
258
  });
332
259
  }
333
260
 
334
- _emberDebugHandlers.invoke.apply(undefined, ['deprecate'].concat(babelHelpers.slice.call(arguments)));
261
+ _emberDebugHandlers.invoke.apply(undefined, ['deprecate'].concat(_slice.call(arguments)));
335
262
  }
336
263
  });
337
264
  enifed("ember-debug/handlers", ["exports"], function (exports) {
@@ -367,7 +294,7 @@ enifed("ember-debug/handlers", ["exports"], function (exports) {
367
294
  }
368
295
  }
369
296
  });
370
- enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'ember-console', 'ember-debug/deprecate', 'ember-debug/warn'], function (exports, _emberMetal, _emberEnvironment, _emberConsole, _emberDebugDeprecate, _emberDebugWarn) {
297
+ enifed('ember-debug/index', ['exports', 'ember-metal/core', 'ember-environment', 'ember-metal/testing', 'ember-metal/debug', 'ember-metal/features', 'ember-metal/error', 'ember-console', 'ember-debug/deprecate', 'ember-debug/warn'], function (exports, _emberMetalCore, _emberEnvironment, _emberMetalTesting, _emberMetalDebug, _emberMetalFeatures, _emberMetalError, _emberConsole, _emberDebugDeprecate, _emberDebugWarn) {
371
298
  'use strict';
372
299
 
373
300
  exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
@@ -403,9 +330,9 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
403
330
  falsy, an exception will be thrown.
404
331
  @public
405
332
  */
406
- _emberMetal.setDebugFunction('assert', function assert(desc, test) {
333
+ _emberMetalDebug.setDebugFunction('assert', function assert(desc, test) {
407
334
  if (!test) {
408
- throw new _emberMetal.Error('Assertion Failed: ' + desc);
335
+ throw new _emberMetalError.default('Assertion Failed: ' + desc);
409
336
  }
410
337
  });
411
338
 
@@ -423,7 +350,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
423
350
  @param {String} message A debug message to display.
424
351
  @public
425
352
  */
426
- _emberMetal.setDebugFunction('debug', function debug(message) {
353
+ _emberMetalDebug.setDebugFunction('debug', function debug(message) {
427
354
  _emberConsole.default.debug('DEBUG: ' + message);
428
355
  });
429
356
 
@@ -436,7 +363,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
436
363
  @method info
437
364
  @private
438
365
  */
439
- _emberMetal.setDebugFunction('info', function info() {
366
+ _emberMetalDebug.setDebugFunction('info', function info() {
440
367
  _emberConsole.default.info.apply(undefined, arguments);
441
368
  });
442
369
 
@@ -459,7 +386,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
459
386
  @return {Function} A new function that wraps the original function with a deprecation warning
460
387
  @private
461
388
  */
462
- _emberMetal.setDebugFunction('deprecateFunc', function deprecateFunc() {
389
+ _emberMetalDebug.setDebugFunction('deprecateFunc', function deprecateFunc() {
463
390
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
464
391
  args[_key] = arguments[_key];
465
392
  }
@@ -472,7 +399,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
472
399
 
473
400
  return {
474
401
  v: function () {
475
- _emberMetal.deprecate(message, false, options);
402
+ _emberMetalDebug.deprecate(message, false, options);
476
403
  return func.apply(this, arguments);
477
404
  }
478
405
  };
@@ -486,7 +413,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
486
413
 
487
414
  return {
488
415
  v: function () {
489
- _emberMetal.deprecate(message);
416
+ _emberMetalDebug.deprecate(message);
490
417
  return func.apply(this, arguments);
491
418
  }
492
419
  };
@@ -517,17 +444,17 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
517
444
  @since 1.5.0
518
445
  @public
519
446
  */
520
- _emberMetal.setDebugFunction('runInDebug', function runInDebug(func) {
447
+ _emberMetalDebug.setDebugFunction('runInDebug', function runInDebug(func) {
521
448
  func();
522
449
  });
523
450
 
524
- _emberMetal.setDebugFunction('debugSeal', function debugSeal(obj) {
451
+ _emberMetalDebug.setDebugFunction('debugSeal', function debugSeal(obj) {
525
452
  Object.seal(obj);
526
453
  });
527
454
 
528
- _emberMetal.setDebugFunction('deprecate', _emberDebugDeprecate.default);
455
+ _emberMetalDebug.setDebugFunction('deprecate', _emberDebugDeprecate.default);
529
456
 
530
- _emberMetal.setDebugFunction('warn', _emberDebugWarn.default);
457
+ _emberMetalDebug.setDebugFunction('warn', _emberDebugWarn.default);
531
458
 
532
459
  /**
533
460
  Will call `Ember.warn()` if ENABLE_OPTIONAL_FEATURES or
@@ -542,7 +469,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
542
469
 
543
470
  function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featuresWereStripped) {
544
471
  if (featuresWereStripped) {
545
- _emberMetal.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
472
+ _emberMetalDebug.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
546
473
 
547
474
  var keys = Object.keys(FEATURES || {});
548
475
  for (var i = 0; i < keys.length; i++) {
@@ -551,23 +478,23 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
551
478
  continue;
552
479
  }
553
480
 
554
- _emberMetal.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
481
+ _emberMetalDebug.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
555
482
  }
556
483
  }
557
484
  }
558
485
 
559
- if (!_emberMetal.isTesting()) {
486
+ if (!_emberMetalTesting.isTesting()) {
560
487
  (function () {
561
488
  // Complain if they're using FEATURE flags in builds other than canary
562
- _emberMetal.FEATURES['features-stripped-test'] = true;
489
+ _emberMetalFeatures.FEATURES['features-stripped-test'] = true;
563
490
  var featuresWereStripped = true;
564
491
 
565
492
  if (false) {
566
493
  featuresWereStripped = false;
567
494
  }
568
495
 
569
- delete _emberMetal.FEATURES['features-stripped-test'];
570
- _warnIfUsingStrippedFeatureFlags(_emberEnvironment.ENV.FEATURES, _emberMetal.DEFAULT_FEATURES, featuresWereStripped);
496
+ delete _emberMetalFeatures.FEATURES['features-stripped-test'];
497
+ _warnIfUsingStrippedFeatureFlags(_emberEnvironment.ENV.FEATURES, _emberMetalFeatures.DEFAULT_FEATURES, featuresWereStripped);
571
498
 
572
499
  // Inform the developer about the Ember Inspector if not installed.
573
500
  var isFirefox = _emberEnvironment.environment.isFirefox;
@@ -584,7 +511,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
584
511
  downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';
585
512
  }
586
513
 
587
- _emberMetal.debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);
514
+ _emberMetalDebug.debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);
588
515
  }
589
516
  }, false);
590
517
  }
@@ -594,7 +521,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
594
521
  @public
595
522
  @class Ember.Debug
596
523
  */
597
- _emberMetal.default.Debug = {};
524
+ _emberMetalCore.default.Debug = {};
598
525
 
599
526
  /**
600
527
  Allows for runtime registration of handler functions that override the default deprecation behavior.
@@ -631,7 +558,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
631
558
  @param handler {Function} A function to handle deprecation calls.
632
559
  @since 2.1.0
633
560
  */
634
- _emberMetal.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
561
+ _emberMetalCore.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
635
562
  /**
636
563
  Allows for runtime registration of handler functions that override the default warning behavior.
637
564
  Warnings are invoked by calls made to [Ember.warn](http://emberjs.com/api/classes/Ember.html#method_warn).
@@ -660,7 +587,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
660
587
  @param handler {Function} A function to handle warnings.
661
588
  @since 2.1.0
662
589
  */
663
- _emberMetal.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
590
+ _emberMetalCore.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
664
591
 
665
592
  /*
666
593
  We are transitioning away from `ember.js` to `ember.debug.js` to make
@@ -673,13 +600,14 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
673
600
  var runningNonEmberDebugJS = false;
674
601
  exports.runningNonEmberDebugJS = runningNonEmberDebugJS;
675
602
  if (runningNonEmberDebugJS) {
676
- _emberMetal.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
603
+ _emberMetalDebug.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
677
604
  }
678
605
  });
679
606
  // reexports
680
- enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-metal', 'ember-debug/handlers'], function (exports, _emberConsole, _emberMetal, _emberDebugHandlers) {
607
+ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-metal/debug', 'ember-debug/handlers'], function (exports, _emberConsole, _emberMetalDebug, _emberDebugHandlers) {
681
608
  'use strict';
682
609
 
610
+ var _slice = Array.prototype.slice;
683
611
  exports.registerHandler = registerHandler;
684
612
  exports.default = warn;
685
613
 
@@ -724,7 +652,7 @@ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-metal', 'ember-de
724
652
 
725
653
  function warn(message, test, options) {
726
654
  if (!options) {
727
- _emberMetal.deprecate(missingOptionsDeprecation, false, {
655
+ _emberMetalDebug.deprecate(missingOptionsDeprecation, false, {
728
656
  id: 'ember-debug.warn-options-missing',
729
657
  until: '3.0.0',
730
658
  url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
@@ -732,17 +660,17 @@ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-metal', 'ember-de
732
660
  }
733
661
 
734
662
  if (options && !options.id) {
735
- _emberMetal.deprecate(missingOptionsIdDeprecation, false, {
663
+ _emberMetalDebug.deprecate(missingOptionsIdDeprecation, false, {
736
664
  id: 'ember-debug.warn-id-missing',
737
665
  until: '3.0.0',
738
666
  url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
739
667
  });
740
668
  }
741
669
 
742
- _emberDebugHandlers.invoke.apply(undefined, ['warn'].concat(babelHelpers.slice.call(arguments)));
670
+ _emberDebugHandlers.invoke.apply(undefined, ['warn'].concat(_slice.call(arguments)));
743
671
  }
744
672
  });
745
- enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {
673
+ enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime/system/object'], function (exports, _emberRuntimeSystemObject) {
746
674
  'use strict';
747
675
 
748
676
  function K() {
@@ -762,7 +690,7 @@ enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function
762
690
  @namespace Ember.Test
763
691
  @public
764
692
  */
765
- exports.default = _emberRuntime.Object.extend({
693
+ exports.default = _emberRuntimeSystemObject.default.extend({
766
694
  /**
767
695
  This callback will be called whenever an async operation is about to start.
768
696
  Override this to call your framework's methods that handle async
@@ -798,7 +726,7 @@ enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function
798
726
  }
799
727
  });
800
728
  });
801
- enifed('ember-testing/adapters/qunit', ['exports', 'ember-utils', 'ember-testing/adapters/adapter'], function (exports, _emberUtils, _emberTestingAdaptersAdapter) {
729
+ enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapter', 'ember-metal/utils'], function (exports, _emberTestingAdaptersAdapter, _emberMetalUtils) {
802
730
  'use strict';
803
731
 
804
732
  /**
@@ -818,11 +746,11 @@ enifed('ember-testing/adapters/qunit', ['exports', 'ember-utils', 'ember-testing
818
746
  QUnit.start();
819
747
  },
820
748
  exception: function (error) {
821
- ok(false, _emberUtils.inspect(error));
749
+ ok(false, _emberMetalUtils.inspect(error));
822
750
  }
823
751
  });
824
752
  });
825
- enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], function (exports, _emberViews, _emberMetal) {
753
+ enifed('ember-testing/events', ['exports', 'ember-views/system/jquery', 'ember-metal/run_loop'], function (exports, _emberViewsSystemJquery, _emberMetalRun_loop) {
826
754
  'use strict';
827
755
 
828
756
  exports.focus = focus;
@@ -836,11 +764,11 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
836
764
  if (!el) {
837
765
  return;
838
766
  }
839
- var $el = _emberViews.jQuery(el);
767
+ var $el = _emberViewsSystemJquery.default(el);
840
768
  if ($el.is(':input, [contenteditable=true]')) {
841
769
  var type = $el.prop('type');
842
770
  if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {
843
- _emberMetal.run(null, function () {
771
+ _emberMetalRun_loop.default(null, function () {
844
772
  // Firefox does not trigger the `focusin` event if the window
845
773
  // does not have focus. If the document doesn't have focus just
846
774
  // use trigger('focusin') instead.
@@ -874,7 +802,7 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
874
802
  clientX: x,
875
803
  clientY: y
876
804
  };
877
- event = buildMouseEvent(type, _emberViews.jQuery.extend(simulatedCoordinates, options));
805
+ event = buildMouseEvent(type, _emberViewsSystemJquery.default.extend(simulatedCoordinates, options));
878
806
  } else {
879
807
  event = buildBasicEvent(type, options);
880
808
  }
@@ -886,7 +814,7 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
886
814
 
887
815
  var event = document.createEvent('Events');
888
816
  event.initEvent(type, true, true);
889
- _emberViews.jQuery.extend(event, options);
817
+ _emberViewsSystemJquery.default.extend(event, options);
890
818
  return event;
891
819
  }
892
820
 
@@ -896,7 +824,7 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
896
824
  var event = undefined;
897
825
  try {
898
826
  event = document.createEvent('MouseEvents');
899
- var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options);
827
+ var eventOpts = _emberViewsSystemJquery.default.extend({}, DEFAULT_EVENT_OPTIONS, options);
900
828
  event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);
901
829
  } catch (e) {
902
830
  event = buildBasicEvent(type, options);
@@ -910,7 +838,7 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
910
838
  var event = undefined;
911
839
  try {
912
840
  event = document.createEvent('KeyEvents');
913
- var eventOpts = _emberViews.jQuery.extend({}, DEFAULT_EVENT_OPTIONS, options);
841
+ var eventOpts = _emberViewsSystemJquery.default.extend({}, DEFAULT_EVENT_OPTIONS, options);
914
842
  event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);
915
843
  } catch (e) {
916
844
  event = buildBasicEvent(type, options);
@@ -918,10 +846,10 @@ enifed('ember-testing/events', ['exports', 'ember-views', 'ember-metal'], functi
918
846
  return event;
919
847
  }
920
848
  });
921
- enifed('ember-testing/ext/application', ['exports', 'ember-application', 'ember-testing/setup_for_testing', 'ember-testing/test/helpers', 'ember-testing/test/promise', 'ember-testing/test/run', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/adapter'], function (exports, _emberApplication, _emberTestingSetup_for_testing, _emberTestingTestHelpers, _emberTestingTestPromise, _emberTestingTestRun, _emberTestingTestOn_inject_helpers, _emberTestingTestAdapter) {
849
+ enifed('ember-testing/ext/application', ['exports', 'ember-application/system/application', 'ember-testing/setup_for_testing', 'ember-testing/test/helpers', 'ember-testing/test/promise', 'ember-testing/test/run', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/adapter'], function (exports, _emberApplicationSystemApplication, _emberTestingSetup_for_testing, _emberTestingTestHelpers, _emberTestingTestPromise, _emberTestingTestRun, _emberTestingTestOn_inject_helpers, _emberTestingTestAdapter) {
922
850
  'use strict';
923
851
 
924
- _emberApplication.Application.reopen({
852
+ _emberApplicationSystemApplication.default.reopen({
925
853
  /**
926
854
  This property contains the testing helpers for the current application. These
927
855
  are created once you call `injectTestHelpers` on your `Ember.Application`
@@ -1108,65 +1036,53 @@ enifed('ember-testing/ext/application', ['exports', 'ember-application', 'ember-
1108
1036
  };
1109
1037
  }
1110
1038
  });
1111
- enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'ember-testing/test/adapter'], function (exports, _emberRuntime, _emberMetal, _emberTestingTestAdapter) {
1039
+ enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime/ext/rsvp', 'ember-metal/run_loop', 'ember-metal/testing', 'ember-testing/test/adapter'], function (exports, _emberRuntimeExtRsvp, _emberMetalRun_loop, _emberMetalTesting, _emberTestingTestAdapter) {
1112
1040
  'use strict';
1113
1041
 
1114
- _emberRuntime.RSVP.configure('async', function (callback, promise) {
1042
+ _emberRuntimeExtRsvp.default.configure('async', function (callback, promise) {
1115
1043
  // if schedule will cause autorun, we need to inform adapter
1116
- if (_emberMetal.isTesting() && !_emberMetal.run.backburner.currentInstance) {
1044
+ if (_emberMetalTesting.isTesting() && !_emberMetalRun_loop.default.backburner.currentInstance) {
1117
1045
  _emberTestingTestAdapter.asyncStart();
1118
- _emberMetal.run.backburner.schedule('actions', function () {
1046
+ _emberMetalRun_loop.default.backburner.schedule('actions', function () {
1119
1047
  _emberTestingTestAdapter.asyncEnd();
1120
1048
  callback(promise);
1121
1049
  });
1122
1050
  } else {
1123
- _emberMetal.run.backburner.schedule('actions', function () {
1051
+ _emberMetalRun_loop.default.backburner.schedule('actions', function () {
1124
1052
  return callback(promise);
1125
1053
  });
1126
1054
  }
1127
1055
  });
1128
1056
 
1129
- exports.default = _emberRuntime.RSVP;
1057
+ exports.default = _emberRuntimeExtRsvp.default;
1130
1058
  });
1131
1059
  enifed('ember-testing/helpers', ['exports', 'ember-testing/test/helpers', 'ember-testing/helpers/and_then', 'ember-testing/helpers/click', 'ember-testing/helpers/current_path', 'ember-testing/helpers/current_route_name', 'ember-testing/helpers/current_url', 'ember-testing/helpers/fill_in', 'ember-testing/helpers/find', 'ember-testing/helpers/find_with_assert', 'ember-testing/helpers/key_event', 'ember-testing/helpers/pause_test', 'ember-testing/helpers/trigger_event', 'ember-testing/helpers/visit', 'ember-testing/helpers/wait'], function (exports, _emberTestingTestHelpers, _emberTestingHelpersAnd_then, _emberTestingHelpersClick, _emberTestingHelpersCurrent_path, _emberTestingHelpersCurrent_route_name, _emberTestingHelpersCurrent_url, _emberTestingHelpersFill_in, _emberTestingHelpersFind, _emberTestingHelpersFind_with_assert, _emberTestingHelpersKey_event, _emberTestingHelpersPause_test, _emberTestingHelpersTrigger_event, _emberTestingHelpersVisit, _emberTestingHelpersWait) {
1132
1060
  'use strict';
1133
1061
 
1134
- _emberTestingTestHelpers.registerAsyncHelper('visit', _emberTestingHelpersVisit.default);
1135
- _emberTestingTestHelpers.registerAsyncHelper('click', _emberTestingHelpersClick.default);
1136
- _emberTestingTestHelpers.registerAsyncHelper('keyEvent', _emberTestingHelpersKey_event.default);
1137
- _emberTestingTestHelpers.registerAsyncHelper('fillIn', _emberTestingHelpersFill_in.default);
1138
- _emberTestingTestHelpers.registerAsyncHelper('wait', _emberTestingHelpersWait.default);
1139
- _emberTestingTestHelpers.registerAsyncHelper('andThen', _emberTestingHelpersAnd_then.default);
1140
- _emberTestingTestHelpers.registerAsyncHelper('pauseTest', _emberTestingHelpersPause_test.default);
1141
- _emberTestingTestHelpers.registerAsyncHelper('triggerEvent', _emberTestingHelpersTrigger_event.default);
1142
-
1143
- _emberTestingTestHelpers.registerHelper('find', _emberTestingHelpersFind.default);
1144
- _emberTestingTestHelpers.registerHelper('findWithAssert', _emberTestingHelpersFind_with_assert.default);
1145
- _emberTestingTestHelpers.registerHelper('currentRouteName', _emberTestingHelpersCurrent_route_name.default);
1146
- _emberTestingTestHelpers.registerHelper('currentPath', _emberTestingHelpersCurrent_path.default);
1147
- _emberTestingTestHelpers.registerHelper('currentURL', _emberTestingHelpersCurrent_url.default);
1148
- });
1149
- enifed("ember-testing/helpers/and_then", ["exports"], function (exports) {
1150
1062
  /**
1151
1063
  @module ember
1152
1064
  @submodule ember-testing
1153
1065
  */
1154
- "use strict";
1155
1066
 
1156
- exports.default = andThen;
1157
-
1158
- function andThen(app, callback) {
1159
- return app.testHelpers.wait(callback(app));
1160
- }
1161
- });
1162
- enifed('ember-testing/helpers/click', ['exports', 'ember-testing/events'], function (exports, _emberTestingEvents) {
1163
1067
  /**
1164
- @module ember
1165
- @submodule ember-testing
1068
+ Loads a route, sets up any controllers, and renders any templates associated
1069
+ with the route as though a real user had triggered the route change while
1070
+ using your app.
1071
+
1072
+ Example:
1073
+
1074
+ ```javascript
1075
+ visit('posts/index').then(function() {
1076
+ // assert something
1077
+ });
1078
+ ```
1079
+
1080
+ @method visit
1081
+ @param {String} url the name of the route
1082
+ @return {RSVP.Promise}
1083
+ @public
1166
1084
  */
1167
- 'use strict';
1168
-
1169
- exports.default = click;
1085
+ _emberTestingTestHelpers.registerAsyncHelper('visit', _emberTestingHelpersVisit.default);
1170
1086
 
1171
1087
  /**
1172
1088
  Clicks an element and triggers any actions triggered by the element's `click`
@@ -1186,30 +1102,111 @@ enifed('ember-testing/helpers/click', ['exports', 'ember-testing/events'], funct
1186
1102
  @return {RSVP.Promise}
1187
1103
  @public
1188
1104
  */
1105
+ _emberTestingTestHelpers.registerAsyncHelper('click', _emberTestingHelpersClick.default);
1189
1106
 
1190
- function click(app, selector, context) {
1191
- var $el = app.testHelpers.findWithAssert(selector, context);
1192
- var el = $el[0];
1193
-
1194
- _emberTestingEvents.fireEvent(el, 'mousedown');
1195
-
1196
- _emberTestingEvents.focus(el);
1107
+ /**
1108
+ Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
1109
+
1110
+ Example:
1111
+
1112
+ ```javascript
1113
+ keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {
1114
+ // assert something
1115
+ });
1116
+ ```
1117
+
1118
+ @method keyEvent
1119
+ @param {String} selector jQuery selector for finding element on the DOM
1120
+ @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`
1121
+ @param {Number} keyCode the keyCode of the simulated key event
1122
+ @return {RSVP.Promise}
1123
+ @since 1.5.0
1124
+ @public
1125
+ */
1126
+ _emberTestingTestHelpers.registerAsyncHelper('keyEvent', _emberTestingHelpersKey_event.default);
1197
1127
 
1198
- _emberTestingEvents.fireEvent(el, 'mouseup');
1199
- _emberTestingEvents.fireEvent(el, 'click');
1128
+ /**
1129
+ Fills in an input element with some text.
1130
+
1131
+ Example:
1132
+
1133
+ ```javascript
1134
+ fillIn('#email', 'you@example.com').then(function() {
1135
+ // assert something
1136
+ });
1137
+ ```
1138
+
1139
+ @method fillIn
1140
+ @param {String} selector jQuery selector finding an input element on the DOM
1141
+ to fill text with
1142
+ @param {String} text text to place inside the input element
1143
+ @return {RSVP.Promise}
1144
+ @public
1145
+ */
1146
+ _emberTestingTestHelpers.registerAsyncHelper('fillIn', _emberTestingHelpersFill_in.default);
1200
1147
 
1201
- return app.testHelpers.wait();
1202
- }
1203
- });
1204
- enifed('ember-testing/helpers/current_path', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1205
1148
  /**
1206
- @module ember
1207
- @submodule ember-testing
1149
+ Finds an element in the context of the app's container element. A simple alias
1150
+ for `app.$(selector)`.
1151
+
1152
+ Example:
1153
+
1154
+ ```javascript
1155
+ var $el = find('.my-selector');
1156
+ ```
1157
+
1158
+ @method find
1159
+ @param {String} selector jQuery string selector for element lookup
1160
+ @return {Object} jQuery object representing the results of the query
1161
+ @public
1208
1162
  */
1209
- 'use strict';
1163
+ _emberTestingTestHelpers.registerHelper('find', _emberTestingHelpersFind.default);
1210
1164
 
1211
- exports.default = currentPath;
1165
+ /**
1166
+ Like `find`, but throws an error if the element selector returns no results.
1167
+
1168
+ Example:
1169
+
1170
+ ```javascript
1171
+ var $el = findWithAssert('.doesnt-exist'); // throws error
1172
+ ```
1173
+
1174
+ @method findWithAssert
1175
+ @param {String} selector jQuery selector string for finding an element within
1176
+ the DOM
1177
+ @return {Object} jQuery object representing the results of the query
1178
+ @throws {Error} throws error if jQuery object returned has a length of 0
1179
+ @public
1180
+ */
1181
+ _emberTestingTestHelpers.registerHelper('findWithAssert', _emberTestingHelpersFind_with_assert.default);
1212
1182
 
1183
+ /**
1184
+ Causes the run loop to process any pending events. This is used to ensure that
1185
+ any async operations from other helpers (or your assertions) have been processed.
1186
+
1187
+ This is most often used as the return value for the helper functions (see 'click',
1188
+ 'fillIn','visit',etc).
1189
+
1190
+ Example:
1191
+
1192
+ ```javascript
1193
+ Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
1194
+ visit('secured/path/here')
1195
+ .fillIn('#username', username)
1196
+ .fillIn('#password', password)
1197
+ .click('.submit')
1198
+
1199
+ return app.testHelpers.wait();
1200
+ });
1201
+
1202
+ @method wait
1203
+ @param {Object} value The value to be returned.
1204
+ @return {RSVP.Promise}
1205
+ @public
1206
+ */
1207
+ _emberTestingTestHelpers.registerAsyncHelper('wait', _emberTestingHelpersWait.default);
1208
+ _emberTestingTestHelpers.registerAsyncHelper('andThen', _emberTestingHelpersAnd_then.default);
1209
+ _emberTestingTestHelpers.registerHelper('currentRouteName', _emberTestingHelpersCurrent_route_name.default);
1213
1210
  /**
1214
1211
  Returns the current path.
1215
1212
 
@@ -1228,13 +1225,69 @@ enifed('ember-testing/helpers/current_path', ['exports', 'ember-metal'], functio
1228
1225
  @since 1.5.0
1229
1226
  @public
1230
1227
  */
1228
+ _emberTestingTestHelpers.registerHelper('currentPath', _emberTestingHelpersCurrent_path.default);
1229
+
1230
+ /**
1231
+ Returns the current URL.
1232
+
1233
+ Example:
1234
+
1235
+ ```javascript
1236
+ function validateURL() {
1237
+ equal(currentURL(), '/some/path', "correct URL was transitioned into.");
1238
+ }
1239
+
1240
+ click('#some-link-id').then(validateURL);
1241
+ ```
1242
+
1243
+ @method currentURL
1244
+ @return {Object} The currently active URL.
1245
+ @since 1.5.0
1246
+ @public
1247
+ */
1248
+ _emberTestingTestHelpers.registerHelper('currentURL', _emberTestingHelpersCurrent_url.default);
1249
+ _emberTestingTestHelpers.registerAsyncHelper('pauseTest', _emberTestingHelpersPause_test.default);
1250
+ _emberTestingTestHelpers.registerAsyncHelper('triggerEvent', _emberTestingHelpersTrigger_event.default);
1251
+ });
1252
+ enifed("ember-testing/helpers/and_then", ["exports"], function (exports) {
1253
+ "use strict";
1254
+
1255
+ exports.default = andThen;
1256
+
1257
+ function andThen(app, callback) {
1258
+ return app.testHelpers.wait(callback(app));
1259
+ }
1260
+ });
1261
+ enifed('ember-testing/helpers/click', ['exports', 'ember-testing/events'], function (exports, _emberTestingEvents) {
1262
+ 'use strict';
1263
+
1264
+ exports.default = click;
1265
+
1266
+ function click(app, selector, context) {
1267
+ var $el = app.testHelpers.findWithAssert(selector, context);
1268
+ var el = $el[0];
1269
+
1270
+ _emberTestingEvents.fireEvent(el, 'mousedown');
1271
+
1272
+ _emberTestingEvents.focus(el);
1273
+
1274
+ _emberTestingEvents.fireEvent(el, 'mouseup');
1275
+ _emberTestingEvents.fireEvent(el, 'click');
1276
+
1277
+ return app.testHelpers.wait();
1278
+ }
1279
+ });
1280
+ enifed('ember-testing/helpers/current_path', ['exports', 'ember-metal/property_get'], function (exports, _emberMetalProperty_get) {
1281
+ 'use strict';
1282
+
1283
+ exports.default = currentPath;
1231
1284
 
1232
1285
  function currentPath(app) {
1233
1286
  var routingService = app.__container__.lookup('service:-routing');
1234
- return _emberMetal.get(routingService, 'currentPath');
1287
+ return _emberMetalProperty_get.get(routingService, 'currentPath');
1235
1288
  }
1236
1289
  });
1237
- enifed('ember-testing/helpers/current_route_name', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1290
+ enifed('ember-testing/helpers/current_route_name', ['exports', 'ember-metal/property_get'], function (exports, _emberMetalProperty_get) {
1238
1291
  /**
1239
1292
  @module ember
1240
1293
  @submodule ember-testing
@@ -1260,70 +1313,24 @@ enifed('ember-testing/helpers/current_route_name', ['exports', 'ember-metal'], f
1260
1313
 
1261
1314
  function currentRouteName(app) {
1262
1315
  var routingService = app.__container__.lookup('service:-routing');
1263
- return _emberMetal.get(routingService, 'currentRouteName');
1316
+ return _emberMetalProperty_get.get(routingService, 'currentRouteName');
1264
1317
  }
1265
1318
  });
1266
- enifed('ember-testing/helpers/current_url', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1267
- /**
1268
- @module ember
1269
- @submodule ember-testing
1270
- */
1319
+ enifed('ember-testing/helpers/current_url', ['exports', 'ember-metal/property_get'], function (exports, _emberMetalProperty_get) {
1271
1320
  'use strict';
1272
1321
 
1273
1322
  exports.default = currentURL;
1274
1323
 
1275
- /**
1276
- Returns the current URL.
1277
-
1278
- Example:
1279
-
1280
- ```javascript
1281
- function validateURL() {
1282
- equal(currentURL(), '/some/path', "correct URL was transitioned into.");
1283
- }
1284
-
1285
- click('#some-link-id').then(validateURL);
1286
- ```
1287
-
1288
- @method currentURL
1289
- @return {Object} The currently active URL.
1290
- @since 1.5.0
1291
- @public
1292
- */
1293
-
1294
1324
  function currentURL(app) {
1295
1325
  var router = app.__container__.lookup('router:main');
1296
- return _emberMetal.get(router, 'location').getURL();
1326
+ return _emberMetalProperty_get.get(router, 'location').getURL();
1297
1327
  }
1298
1328
  });
1299
1329
  enifed('ember-testing/helpers/fill_in', ['exports', 'ember-testing/events'], function (exports, _emberTestingEvents) {
1300
- /**
1301
- @module ember
1302
- @submodule ember-testing
1303
- */
1304
1330
  'use strict';
1305
1331
 
1306
1332
  exports.default = fillIn;
1307
1333
 
1308
- /**
1309
- Fills in an input element with some text.
1310
-
1311
- Example:
1312
-
1313
- ```javascript
1314
- fillIn('#email', 'you@example.com').then(function() {
1315
- // assert something
1316
- });
1317
- ```
1318
-
1319
- @method fillIn
1320
- @param {String} selector jQuery selector finding an input element on the DOM
1321
- to fill text with
1322
- @param {String} text text to place inside the input element
1323
- @return {RSVP.Promise}
1324
- @public
1325
- */
1326
-
1327
1334
  function fillIn(app, selector, contextOrText, text) {
1328
1335
  var $el = undefined,
1329
1336
  el = undefined,
@@ -1344,75 +1351,19 @@ enifed('ember-testing/helpers/fill_in', ['exports', 'ember-testing/events'], fun
1344
1351
  return app.testHelpers.wait();
1345
1352
  }
1346
1353
  });
1347
- enifed('ember-testing/helpers/find', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1348
- /**
1349
- @module ember
1350
- @submodule ember-testing
1351
- */
1354
+ enifed('ember-testing/helpers/find', ['exports', 'ember-metal/property_get'], function (exports, _emberMetalProperty_get) {
1352
1355
  'use strict';
1353
1356
 
1354
1357
  exports.default = find;
1355
1358
 
1356
- /**
1357
- Finds an element in the context of the app's container element. A simple alias
1358
- for `app.$(selector)`.
1359
-
1360
- Example:
1361
-
1362
- ```javascript
1363
- var $el = find('.my-selector');
1364
- ```
1365
-
1366
- With the `context` param:
1367
-
1368
- ```javascript
1369
- var $el = find('.my-selector', '.parent-element-class');
1370
- ```
1371
-
1372
- @method find
1373
- @param {String} selector jQuery string selector for element lookup
1374
- @param {String} [context] (optional) jQuery selector that will limit the selector
1375
- argument to find only within the context's children
1376
- @return {Object} jQuery object representing the results of the query
1377
- @public
1378
- */
1379
-
1380
1359
  function find(app, selector, context) {
1381
1360
  var $el = undefined;
1382
- context = context || _emberMetal.get(app, 'rootElement');
1361
+ context = context || _emberMetalProperty_get.get(app, 'rootElement');
1383
1362
  $el = app.$(selector, context);
1384
1363
  return $el;
1385
1364
  }
1386
1365
  });
1387
1366
  enifed('ember-testing/helpers/find_with_assert', ['exports'], function (exports) {
1388
- /**
1389
- @module ember
1390
- @submodule ember-testing
1391
- */
1392
- /**
1393
- Like `find`, but throws an error if the element selector returns no results.
1394
-
1395
- Example:
1396
-
1397
- ```javascript
1398
- var $el = findWithAssert('.doesnt-exist'); // throws error
1399
- ```
1400
-
1401
- With the `context` param:
1402
-
1403
- ```javascript
1404
- var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass
1405
- ```
1406
-
1407
- @method findWithAssert
1408
- @param {String} selector jQuery selector string for finding an element within
1409
- the DOM
1410
- @param {String} [context] (optional) jQuery selector that will limit the
1411
- selector argument to find only within the context's children
1412
- @return {Object} jQuery object representing the results of the query
1413
- @throws {Error} throws error if jQuery object returned has a length of 0
1414
- @public
1415
- */
1416
1367
  'use strict';
1417
1368
 
1418
1369
  exports.default = findWithAssert;
@@ -1426,26 +1377,6 @@ enifed('ember-testing/helpers/find_with_assert', ['exports'], function (exports)
1426
1377
  }
1427
1378
  });
1428
1379
  enifed('ember-testing/helpers/key_event', ['exports'], function (exports) {
1429
- /**
1430
- @module ember
1431
- @submodule ember-testing
1432
- */
1433
- /**
1434
- Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
1435
- Example:
1436
- ```javascript
1437
- keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {
1438
- // assert something
1439
- });
1440
- ```
1441
- @method keyEvent
1442
- @param {String} selector jQuery selector for finding element on the DOM
1443
- @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`
1444
- @param {Number} keyCode the keyCode of the simulated key event
1445
- @return {RSVP.Promise}
1446
- @since 1.5.0
1447
- @public
1448
- */
1449
1380
  'use strict';
1450
1381
 
1451
1382
  exports.default = keyEvent;
@@ -1466,7 +1397,7 @@ enifed('ember-testing/helpers/key_event', ['exports'], function (exports) {
1466
1397
  return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode });
1467
1398
  }
1468
1399
  });
1469
- enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {
1400
+ enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime/ext/rsvp'], function (exports, _emberRuntimeExtRsvp) {
1470
1401
  /**
1471
1402
  @module ember
1472
1403
  @submodule ember-testing
@@ -1491,7 +1422,7 @@ enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime'], functio
1491
1422
  */
1492
1423
 
1493
1424
  function pauseTest() {
1494
- return new _emberRuntime.RSVP.Promise(function () {}, 'TestAdapter paused promise');
1425
+ return new _emberRuntimeExtRsvp.default.Promise(function () {}, 'TestAdapter paused promise');
1495
1426
  }
1496
1427
  });
1497
1428
  enifed('ember-testing/helpers/trigger_event', ['exports', 'ember-testing/events'], function (exports, _emberTestingEvents) {
@@ -1565,34 +1496,11 @@ enifed('ember-testing/helpers/trigger_event', ['exports', 'ember-testing/events'
1565
1496
  return app.testHelpers.wait();
1566
1497
  }
1567
1498
  });
1568
- enifed('ember-testing/helpers/visit', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1569
- /**
1570
- @module ember
1571
- @submodule ember-testing
1572
- */
1499
+ enifed('ember-testing/helpers/visit', ['exports', 'ember-metal/run_loop'], function (exports, _emberMetalRun_loop) {
1573
1500
  'use strict';
1574
1501
 
1575
1502
  exports.default = visit;
1576
1503
 
1577
- /**
1578
- Loads a route, sets up any controllers, and renders any templates associated
1579
- with the route as though a real user had triggered the route change while
1580
- using your app.
1581
-
1582
- Example:
1583
-
1584
- ```javascript
1585
- visit('posts/index').then(function() {
1586
- // assert something
1587
- });
1588
- ```
1589
-
1590
- @method visit
1591
- @param {String} url the name of the route
1592
- @return {RSVP.Promise}
1593
- @public
1594
- */
1595
-
1596
1504
  function visit(app, url) {
1597
1505
  var router = app.__container__.lookup('router:main');
1598
1506
  var shouldHandleURL = false;
@@ -1601,13 +1509,13 @@ enifed('ember-testing/helpers/visit', ['exports', 'ember-metal'], function (expo
1601
1509
  router.location.setURL(url);
1602
1510
 
1603
1511
  if (shouldHandleURL) {
1604
- _emberMetal.run(app.__deprecatedInstance__, 'handleURL', url);
1512
+ _emberMetalRun_loop.default(app.__deprecatedInstance__, 'handleURL', url);
1605
1513
  }
1606
1514
  });
1607
1515
 
1608
1516
  if (app._readinessDeferrals > 0) {
1609
1517
  router['initialURL'] = url;
1610
- _emberMetal.run(app, 'advanceReadiness');
1518
+ _emberMetalRun_loop.default(app, 'advanceReadiness');
1611
1519
  delete router['initialURL'];
1612
1520
  } else {
1613
1521
  shouldHandleURL = true;
@@ -1616,42 +1524,13 @@ enifed('ember-testing/helpers/visit', ['exports', 'ember-metal'], function (expo
1616
1524
  return app.testHelpers.wait();
1617
1525
  }
1618
1526
  });
1619
- enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', 'ember-runtime', 'ember-metal', 'ember-testing/test/pending_requests'], function (exports, _emberTestingTestWaiters, _emberRuntime, _emberMetal, _emberTestingTestPending_requests) {
1620
- /**
1621
- @module ember
1622
- @submodule ember-testing
1623
- */
1527
+ enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', 'ember-runtime/ext/rsvp', 'ember-metal/run_loop', 'ember-testing/test/pending_requests'], function (exports, _emberTestingTestWaiters, _emberRuntimeExtRsvp, _emberMetalRun_loop, _emberTestingTestPending_requests) {
1624
1528
  'use strict';
1625
1529
 
1626
1530
  exports.default = wait;
1627
1531
 
1628
- /**
1629
- Causes the run loop to process any pending events. This is used to ensure that
1630
- any async operations from other helpers (or your assertions) have been processed.
1631
-
1632
- This is most often used as the return value for the helper functions (see 'click',
1633
- 'fillIn','visit',etc).
1634
-
1635
- Example:
1636
-
1637
- ```javascript
1638
- Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
1639
- visit('secured/path/here')
1640
- .fillIn('#username', username)
1641
- .fillIn('#password', password)
1642
- .click('.submit')
1643
-
1644
- return app.testHelpers.wait();
1645
- });
1646
-
1647
- @method wait
1648
- @param {Object} value The value to be returned.
1649
- @return {RSVP.Promise}
1650
- @public
1651
- */
1652
-
1653
1532
  function wait(app, value) {
1654
- return new _emberRuntime.RSVP.Promise(function (resolve) {
1533
+ return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
1655
1534
  var router = app.__container__.lookup('router:main');
1656
1535
 
1657
1536
  // Every 10ms, poll for the async thing to have finished
@@ -1668,7 +1547,7 @@ enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', '
1668
1547
  }
1669
1548
 
1670
1549
  // 3. If there are scheduled timers or we are inside of a run loop, keep polling
1671
- if (_emberMetal.run.hasScheduledTimers() || _emberMetal.run.currentRunLoop) {
1550
+ if (_emberMetalRun_loop.default.hasScheduledTimers() || _emberMetalRun_loop.default.currentRunLoop) {
1672
1551
  return;
1673
1552
  }
1674
1553
 
@@ -1680,34 +1559,39 @@ enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', '
1680
1559
  clearInterval(watcher);
1681
1560
 
1682
1561
  // Synchronously resolve the promise
1683
- _emberMetal.run(null, resolve, value);
1562
+ _emberMetalRun_loop.default(null, resolve, value);
1684
1563
  }, 10);
1685
1564
  });
1686
1565
  }
1687
1566
  });
1688
- enifed('ember-testing/index', ['exports', 'ember-testing/support', 'ember-testing/ext/application', 'ember-testing/ext/rsvp', 'ember-testing/helpers', 'ember-testing/initializers', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/setup_for_testing', 'ember-testing/adapters/qunit'], function (exports, _emberTestingSupport, _emberTestingExtApplication, _emberTestingExtRsvp, _emberTestingHelpers, _emberTestingInitializers, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingSetup_for_testing, _emberTestingAdaptersQunit) {
1567
+ enifed('ember-testing/index', ['exports', 'ember-metal/core', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/setup_for_testing', 'require', 'ember-testing/support', 'ember-testing/ext/application', 'ember-testing/ext/rsvp', 'ember-testing/helpers', 'ember-testing/initializers'], function (exports, _emberMetalCore, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingSetup_for_testing, _require, _emberTestingSupport, _emberTestingExtApplication, _emberTestingExtRsvp, _emberTestingHelpers, _emberTestingInitializers) {
1689
1568
  'use strict';
1690
1569
 
1691
- exports.Test = _emberTestingTest.default;
1692
- exports.Adapter = _emberTestingAdaptersAdapter.default;
1693
- exports.setupForTesting = _emberTestingSetup_for_testing.default;
1694
- exports.QUnitAdapter = _emberTestingAdaptersQunit.default;
1570
+ // to setup initializer
1571
+
1572
+ /**
1573
+ @module ember
1574
+ @submodule ember-testing
1575
+ */
1576
+
1577
+ _emberMetalCore.default.Test = _emberTestingTest.default;
1578
+ _emberMetalCore.default.Test.Adapter = _emberTestingAdaptersAdapter.default;
1579
+ _emberMetalCore.default.setupForTesting = _emberTestingSetup_for_testing.default;
1580
+ Object.defineProperty(_emberTestingTest.default, 'QUnitAdapter', {
1581
+ get: function () {
1582
+ return _require.default('ember-testing/adapters/qunit').default;
1583
+ }
1584
+ });
1695
1585
  });
1586
+ // reexports
1696
1587
  // to handle various edge cases
1697
- // setup RSVP + run loop integration
1698
1588
  // adds helpers to helpers object in Test
1699
- // to setup initializer
1700
-
1701
- /**
1702
- @module ember
1703
- @submodule ember-testing
1704
- */
1705
- enifed('ember-testing/initializers', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {
1589
+ enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load'], function (exports, _emberRuntimeSystemLazy_load) {
1706
1590
  'use strict';
1707
1591
 
1708
1592
  var name = 'deferReadiness in `testing` mode';
1709
1593
 
1710
- _emberRuntime.onLoad('Ember.Application', function (Application) {
1594
+ _emberRuntimeSystemLazy_load.onLoad('Ember.Application', function (Application) {
1711
1595
  if (!Application.initializers[name]) {
1712
1596
  Application.initializer({
1713
1597
  name: name,
@@ -1721,7 +1605,7 @@ enifed('ember-testing/initializers', ['exports', 'ember-runtime'], function (exp
1721
1605
  }
1722
1606
  });
1723
1607
  });
1724
- enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/qunit'], function (exports, _emberMetal, _emberViews, _emberTestingTestAdapter, _emberTestingTestPending_requests, _emberTestingAdaptersQunit) {
1608
+ enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal/testing', 'ember-views/system/jquery', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'require'], function (exports, _emberMetalTesting, _emberViewsSystemJquery, _emberTestingTestAdapter, _emberTestingTestPending_requests, _require) {
1725
1609
  'use strict';
1726
1610
 
1727
1611
  exports.default = setupForTesting;
@@ -1740,24 +1624,25 @@ enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-view
1740
1624
  */
1741
1625
 
1742
1626
  function setupForTesting() {
1743
- _emberMetal.setTesting(true);
1627
+ _emberMetalTesting.setTesting(true);
1744
1628
 
1745
1629
  var adapter = _emberTestingTestAdapter.getAdapter();
1746
1630
  // if adapter is not manually set default to QUnit
1747
1631
  if (!adapter) {
1748
- _emberTestingTestAdapter.setAdapter(new _emberTestingAdaptersQunit.default());
1632
+ var QUnitAdapter = _require.default('ember-testing/adapters/qunit').default;
1633
+ _emberTestingTestAdapter.setAdapter(new QUnitAdapter());
1749
1634
  }
1750
1635
 
1751
- _emberViews.jQuery(document).off('ajaxSend', _emberTestingTestPending_requests.incrementPendingRequests);
1752
- _emberViews.jQuery(document).off('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);
1636
+ _emberViewsSystemJquery.default(document).off('ajaxSend', _emberTestingTestPending_requests.incrementPendingRequests);
1637
+ _emberViewsSystemJquery.default(document).off('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);
1753
1638
 
1754
1639
  _emberTestingTestPending_requests.clearPendingRequests();
1755
1640
 
1756
- _emberViews.jQuery(document).on('ajaxSend', _emberTestingTestPending_requests.incrementPendingRequests);
1757
- _emberViews.jQuery(document).on('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);
1641
+ _emberViewsSystemJquery.default(document).on('ajaxSend', _emberTestingTestPending_requests.incrementPendingRequests);
1642
+ _emberViewsSystemJquery.default(document).on('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);
1758
1643
  }
1759
1644
  });
1760
- enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember-environment'], function (exports, _emberMetal, _emberViews, _emberEnvironment) {
1645
+ enifed('ember-testing/support', ['exports', 'ember-metal/debug', 'ember-views/system/jquery', 'ember-environment'], function (exports, _emberMetalDebug, _emberViewsSystemJquery, _emberEnvironment) {
1761
1646
  'use strict';
1762
1647
 
1763
1648
  /**
@@ -1765,7 +1650,7 @@ enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember
1765
1650
  @submodule ember-testing
1766
1651
  */
1767
1652
 
1768
- var $ = _emberViews.jQuery;
1653
+ var $ = _emberViewsSystemJquery.default;
1769
1654
 
1770
1655
  /**
1771
1656
  This method creates a checkbox and triggers the click event to fire the
@@ -1776,11 +1661,10 @@ enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember
1776
1661
  @method testCheckboxClick
1777
1662
  */
1778
1663
  function testCheckboxClick(handler) {
1779
- var input = document.createElement('input');
1780
- $(input).attr('type', 'checkbox').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove();
1664
+ $('<input type="checkbox">').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove();
1781
1665
  }
1782
1666
 
1783
- if (_emberEnvironment.environment.hasDOM && typeof $ === 'function') {
1667
+ if (_emberEnvironment.environment.hasDOM) {
1784
1668
  $(function () {
1785
1669
  /*
1786
1670
  Determine whether a checkbox checked using jQuery's "click" method will have
@@ -1805,12 +1689,12 @@ enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember
1805
1689
 
1806
1690
  // Try again to verify that the patch took effect or blow up.
1807
1691
  testCheckboxClick(function () {
1808
- _emberMetal.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' });
1692
+ _emberMetalDebug.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' });
1809
1693
  });
1810
1694
  });
1811
1695
  }
1812
1696
  });
1813
- enifed('ember-testing/test', ['exports', 'ember-testing/test/helpers', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/promise', 'ember-testing/test/waiters', 'ember-testing/test/adapter', 'ember-metal'], function (exports, _emberTestingTestHelpers, _emberTestingTestOn_inject_helpers, _emberTestingTestPromise, _emberTestingTestWaiters, _emberTestingTestAdapter, _emberMetal) {
1697
+ enifed('ember-testing/test', ['exports', 'ember-testing/test/helpers', 'ember-testing/test/on_inject_helpers', 'ember-testing/test/promise', 'ember-testing/test/waiters', 'ember-testing/test/adapter', 'ember-metal/features'], function (exports, _emberTestingTestHelpers, _emberTestingTestOn_inject_helpers, _emberTestingTestPromise, _emberTestingTestWaiters, _emberTestingTestAdapter, _emberMetalFeatures) {
1814
1698
  /**
1815
1699
  @module ember
1816
1700
  @submodule ember-testing
@@ -1884,7 +1768,7 @@ enifed('ember-testing/test', ['exports', 'ember-testing/test/helpers', 'ember-te
1884
1768
 
1885
1769
  exports.default = Test;
1886
1770
  });
1887
- enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal'], function (exports, _emberConsole, _emberMetal) {
1771
+ enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal/error_handler'], function (exports, _emberConsole, _emberMetalError_handler) {
1888
1772
  'use strict';
1889
1773
 
1890
1774
  exports.getAdapter = getAdapter;
@@ -1901,9 +1785,9 @@ enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal']
1901
1785
  function setAdapter(value) {
1902
1786
  adapter = value;
1903
1787
  if (value) {
1904
- _emberMetal.setDispatchOverride(adapterDispatch);
1788
+ _emberMetalError_handler.setDispatchOverride(adapterDispatch);
1905
1789
  } else {
1906
- _emberMetal.setDispatchOverride(null);
1790
+ _emberMetalError_handler.setDispatchOverride(null);
1907
1791
  }
1908
1792
  }
1909
1793
 
@@ -2114,20 +1998,26 @@ enifed("ember-testing/test/pending_requests", ["exports"], function (exports) {
2114
1998
  }
2115
1999
  }
2116
2000
  });
2117
- enifed('ember-testing/test/promise', ['exports', 'ember-runtime', 'ember-testing/test/run'], function (exports, _emberRuntime, _emberTestingTestRun) {
2001
+ enifed('ember-testing/test/promise', ['exports', 'ember-runtime/ext/rsvp', 'ember-testing/test/run'], function (exports, _emberRuntimeExtRsvp, _emberTestingTestRun) {
2118
2002
  'use strict';
2119
2003
 
2120
2004
  exports.promise = promise;
2121
2005
  exports.resolve = resolve;
2122
2006
  exports.getLastPromise = getLastPromise;
2123
2007
 
2008
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
2009
+
2010
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
2011
+
2012
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
2013
+
2124
2014
  var lastPromise = undefined;
2125
2015
 
2126
2016
  var TestPromise = (function (_RSVP$Promise) {
2127
- babelHelpers.inherits(TestPromise, _RSVP$Promise);
2017
+ _inherits(TestPromise, _RSVP$Promise);
2128
2018
 
2129
2019
  function TestPromise() {
2130
- babelHelpers.classCallCheck(this, TestPromise);
2020
+ _classCallCheck(this, TestPromise);
2131
2021
 
2132
2022
  _RSVP$Promise.apply(this, arguments);
2133
2023
  lastPromise = this;
@@ -2166,7 +2056,7 @@ enifed('ember-testing/test/promise', ['exports', 'ember-runtime', 'ember-testing
2166
2056
  };
2167
2057
 
2168
2058
  return TestPromise;
2169
- })(_emberRuntime.RSVP.Promise);
2059
+ })(_emberRuntimeExtRsvp.default.Promise);
2170
2060
 
2171
2061
  exports.default = TestPromise;
2172
2062
 
@@ -2226,20 +2116,20 @@ enifed('ember-testing/test/promise', ['exports', 'ember-runtime', 'ember-testing
2226
2116
  }
2227
2117
  }
2228
2118
  });
2229
- enifed('ember-testing/test/run', ['exports', 'ember-metal'], function (exports, _emberMetal) {
2119
+ enifed('ember-testing/test/run', ['exports', 'ember-metal/run_loop'], function (exports, _emberMetalRun_loop) {
2230
2120
  'use strict';
2231
2121
 
2232
2122
  exports.default = run;
2233
2123
 
2234
2124
  function run(fn) {
2235
- if (!_emberMetal.run.currentRunLoop) {
2236
- return _emberMetal.run(fn);
2125
+ if (!_emberMetalRun_loop.default.currentRunLoop) {
2126
+ return _emberMetalRun_loop.default(fn);
2237
2127
  } else {
2238
2128
  return fn();
2239
2129
  }
2240
2130
  }
2241
2131
  });
2242
- enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (exports, _emberMetal) {
2132
+ enifed('ember-testing/test/waiters', ['exports', 'ember-metal/features', 'ember-metal/debug'], function (exports, _emberMetalFeatures, _emberMetalDebug) {
2243
2133
  'use strict';
2244
2134
 
2245
2135
  exports.registerWaiter = registerWaiter;
@@ -2253,10 +2143,7 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (expor
2253
2143
  /**
2254
2144
  This allows ember-testing to play nicely with other asynchronous
2255
2145
  events, such as an application that is waiting for a CSS3
2256
- transition or an IndexDB transaction. The waiter runs periodically
2257
- after each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed,
2258
- until the returning result is truthy. After the waiters finish, the next async helper
2259
- is executed and the process repeats.
2146
+ transition or an IndexDB transaction.
2260
2147
 
2261
2148
  For example:
2262
2149
 
@@ -2360,7 +2247,7 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (expor
2360
2247
  }
2361
2248
 
2362
2249
  function generateDeprecatedWaitersArray() {
2363
- _emberMetal.deprecate('Usage of `Ember.Test.waiters` is deprecated. Please refactor to `Ember.Test.checkWaiters`.', !true, { until: '2.8.0', id: 'ember-testing.test-waiters' });
2250
+ _emberMetalDebug.deprecate('Usage of `Ember.Test.waiters` is deprecated. Please refactor to `Ember.Test.checkWaiters`.', !true, { until: '2.8.0', id: 'ember-testing.test-waiters' });
2364
2251
 
2365
2252
  var array = new Array(callbacks.length);
2366
2253
  for (var i = 0; i < callbacks.length; i++) {