ember-source 1.13.5 → 1.13.6
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.
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 +980 -719
- data/dist/ember-testing.js +94 -71
- data/dist/ember.debug.js +3379 -2503
- data/dist/ember.js +3379 -2503
- data/dist/ember.min.js +16 -16
- data/dist/ember.prod.js +3121 -2293
- metadata +2 -2
data/dist/ember-testing.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
* @license Licensed under MIT license
|
7
7
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
|
-
* @version 1.13.
|
8
|
+
* @version 1.13.6
|
9
9
|
*/
|
10
10
|
|
11
11
|
(function() {
|
@@ -115,6 +115,10 @@ var mainContext = this;
|
|
115
115
|
})();
|
116
116
|
|
117
117
|
enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/logger", "ember-debug/deprecation-manager", "ember-metal/environment"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalLogger, _emberDebugDeprecationManager, _emberMetalEnvironment) {
|
118
|
+
/*global __fail__*/
|
119
|
+
|
120
|
+
"use strict";
|
121
|
+
|
118
122
|
exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
|
119
123
|
|
120
124
|
/**
|
@@ -128,7 +132,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
128
132
|
*/
|
129
133
|
|
130
134
|
function isPlainFunction(test) {
|
131
|
-
return typeof test ===
|
135
|
+
return typeof test === 'function' && test.PrototypeMixin === undefined;
|
132
136
|
}
|
133
137
|
|
134
138
|
/**
|
@@ -179,7 +183,7 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
179
183
|
_emberMetalCore["default"].warn = function (message, test) {
|
180
184
|
if (!test) {
|
181
185
|
_emberMetalLogger["default"].warn("WARNING: " + message);
|
182
|
-
if (
|
186
|
+
if ('trace' in _emberMetalLogger["default"]) {
|
183
187
|
_emberMetalLogger["default"].trace();
|
184
188
|
}
|
185
189
|
}
|
@@ -256,23 +260,23 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
256
260
|
}
|
257
261
|
|
258
262
|
if (arguments.length === 3) {
|
259
|
-
_emberMetalCore["default"].assert(
|
263
|
+
_emberMetalCore["default"].assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object');
|
260
264
|
if (options.url) {
|
261
|
-
message +=
|
265
|
+
message += ' See ' + options.url + ' for more details.';
|
262
266
|
}
|
263
267
|
}
|
264
268
|
|
265
269
|
if (_emberMetalCore["default"].LOG_STACKTRACE_ON_DEPRECATION && error.stack) {
|
266
270
|
var stack;
|
267
|
-
var stackStr =
|
271
|
+
var stackStr = '';
|
268
272
|
|
269
|
-
if (error[
|
273
|
+
if (error['arguments']) {
|
270
274
|
// Chrome
|
271
|
-
stack = error.stack.replace(/^\s+at\s+/gm,
|
275
|
+
stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
|
272
276
|
stack.shift();
|
273
277
|
} else {
|
274
278
|
// Firefox
|
275
|
-
stack = error.stack.replace(/(?:\n@:0)?\s+$/m,
|
279
|
+
stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
|
276
280
|
}
|
277
281
|
|
278
282
|
stackStr = "\n " + stack.slice(2).join("\n ");
|
@@ -375,12 +379,12 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
375
379
|
|
376
380
|
function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) {
|
377
381
|
if (featuresWereStripped) {
|
378
|
-
_emberMetalCore["default"].warn(
|
379
|
-
_emberMetalCore["default"].warn(
|
382
|
+
_emberMetalCore["default"].warn('Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.', !_emberMetalCore["default"].ENV.ENABLE_ALL_FEATURES);
|
383
|
+
_emberMetalCore["default"].warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore["default"].ENV.ENABLE_OPTIONAL_FEATURES);
|
380
384
|
|
381
385
|
for (var key in FEATURES) {
|
382
|
-
if (FEATURES.hasOwnProperty(key) && key !==
|
383
|
-
_emberMetalCore["default"].warn(
|
386
|
+
if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') {
|
387
|
+
_emberMetalCore["default"].warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key]);
|
384
388
|
}
|
385
389
|
}
|
386
390
|
}
|
@@ -388,29 +392,29 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
388
392
|
|
389
393
|
if (!_emberMetalCore["default"].testing) {
|
390
394
|
// Complain if they're using FEATURE flags in builds other than canary
|
391
|
-
_emberMetalCore["default"].FEATURES[
|
395
|
+
_emberMetalCore["default"].FEATURES['features-stripped-test'] = true;
|
392
396
|
var featuresWereStripped = true;
|
393
397
|
|
394
398
|
|
395
|
-
delete _emberMetalCore["default"].FEATURES[
|
399
|
+
delete _emberMetalCore["default"].FEATURES['features-stripped-test'];
|
396
400
|
_warnIfUsingStrippedFeatureFlags(_emberMetalCore["default"].ENV.FEATURES, featuresWereStripped);
|
397
401
|
|
398
402
|
// Inform the developer about the Ember Inspector if not installed.
|
399
403
|
var isFirefox = _emberMetalEnvironment["default"].isFirefox;
|
400
404
|
var isChrome = _emberMetalEnvironment["default"].isChrome;
|
401
405
|
|
402
|
-
if (typeof window !==
|
406
|
+
if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {
|
403
407
|
window.addEventListener("load", function () {
|
404
408
|
if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {
|
405
409
|
var downloadURL;
|
406
410
|
|
407
411
|
if (isChrome) {
|
408
|
-
downloadURL =
|
412
|
+
downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';
|
409
413
|
} else if (isFirefox) {
|
410
|
-
downloadURL =
|
414
|
+
downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';
|
411
415
|
}
|
412
416
|
|
413
|
-
_emberMetalCore["default"].debug(
|
417
|
+
_emberMetalCore["default"].debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);
|
414
418
|
}
|
415
419
|
}, false);
|
416
420
|
}
|
@@ -434,11 +438,12 @@ enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "embe
|
|
434
438
|
var runningNonEmberDebugJS = false;
|
435
439
|
exports.runningNonEmberDebugJS = runningNonEmberDebugJS;
|
436
440
|
if (runningNonEmberDebugJS) {
|
437
|
-
_emberMetalCore["default"].warn(
|
441
|
+
_emberMetalCore["default"].warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
|
438
442
|
}
|
439
443
|
});
|
440
|
-
/*global __fail__*/
|
441
444
|
enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary', 'ember-metal/utils'], function (exports, _emberMetalDictionary, _emberMetalUtils) {
|
445
|
+
'use strict';
|
446
|
+
|
442
447
|
var deprecationLevels = {
|
443
448
|
RAISE: _emberMetalUtils.symbol('RAISE'),
|
444
449
|
LOG: _emberMetalUtils.symbol('LOG'),
|
@@ -465,6 +470,8 @@ enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary',
|
|
465
470
|
};
|
466
471
|
});
|
467
472
|
enifed("ember-testing", ["exports", "ember-metal/core", "ember-testing/initializers", "ember-testing/support", "ember-testing/setup_for_testing", "ember-testing/test", "ember-testing/adapters/adapter", "ember-testing/adapters/qunit", "ember-testing/helpers"], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) {
|
473
|
+
"use strict";
|
474
|
+
|
468
475
|
// adds helpers to helpers object in Test
|
469
476
|
|
470
477
|
/**
|
@@ -480,6 +487,7 @@ enifed("ember-testing", ["exports", "ember-metal/core", "ember-testing/initializ
|
|
480
487
|
// to setup initializer
|
481
488
|
// to handle various edge cases
|
482
489
|
enifed("ember-testing/adapters/adapter", ["exports", "ember-runtime/system/object"], function (exports, _emberRuntimeSystemObject) {
|
490
|
+
"use strict";
|
483
491
|
|
484
492
|
function K() {
|
485
493
|
return this;
|
@@ -537,6 +545,7 @@ enifed("ember-testing/adapters/adapter", ["exports", "ember-runtime/system/objec
|
|
537
545
|
exports["default"] = Adapter;
|
538
546
|
});
|
539
547
|
enifed("ember-testing/adapters/qunit", ["exports", "ember-testing/adapters/adapter", "ember-metal/utils"], function (exports, _emberTestingAdaptersAdapter, _emberMetalUtils) {
|
548
|
+
"use strict";
|
540
549
|
|
541
550
|
/**
|
542
551
|
This class implements the methods defined by Ember.Test.Adapter for the
|
@@ -560,6 +569,7 @@ enifed("ember-testing/adapters/qunit", ["exports", "ember-testing/adapters/adapt
|
|
560
569
|
});
|
561
570
|
});
|
562
571
|
enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/error", "ember-metal/run_loop", "ember-views/system/jquery", "ember-testing/test", "ember-runtime/ext/rsvp"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp) {
|
572
|
+
"use strict";
|
563
573
|
|
564
574
|
/**
|
565
575
|
@module ember
|
@@ -570,32 +580,32 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
570
580
|
var asyncHelper = _emberTestingTest["default"].registerAsyncHelper;
|
571
581
|
|
572
582
|
function currentRouteName(app) {
|
573
|
-
var appController = app.__container__.lookup(
|
583
|
+
var appController = app.__container__.lookup('controller:application');
|
574
584
|
|
575
|
-
return _emberMetalProperty_get.get(appController,
|
585
|
+
return _emberMetalProperty_get.get(appController, 'currentRouteName');
|
576
586
|
}
|
577
587
|
|
578
588
|
function currentPath(app) {
|
579
|
-
var appController = app.__container__.lookup(
|
589
|
+
var appController = app.__container__.lookup('controller:application');
|
580
590
|
|
581
|
-
return _emberMetalProperty_get.get(appController,
|
591
|
+
return _emberMetalProperty_get.get(appController, 'currentPath');
|
582
592
|
}
|
583
593
|
|
584
594
|
function currentURL(app) {
|
585
|
-
var router = app.__container__.lookup(
|
595
|
+
var router = app.__container__.lookup('router:main');
|
586
596
|
|
587
|
-
return _emberMetalProperty_get.get(router,
|
597
|
+
return _emberMetalProperty_get.get(router, 'location').getURL();
|
588
598
|
}
|
589
599
|
|
590
600
|
function pauseTest() {
|
591
601
|
_emberTestingTest["default"].adapter.asyncStart();
|
592
|
-
return new _emberMetalCore["default"].RSVP.Promise(function () {},
|
602
|
+
return new _emberMetalCore["default"].RSVP.Promise(function () {}, 'TestAdapter paused promise');
|
593
603
|
}
|
594
604
|
|
595
605
|
function focus(el) {
|
596
|
-
if (el && el.is(
|
597
|
-
var type = el.prop(
|
598
|
-
if (type !==
|
606
|
+
if (el && el.is(':input, [contenteditable=true]')) {
|
607
|
+
var type = el.prop('type');
|
608
|
+
if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {
|
599
609
|
_emberMetalRun_loop["default"](el, function () {
|
600
610
|
// Firefox does not trigger the `focusin` event if the window
|
601
611
|
// does not have focus. If the document doesn't have focus just
|
@@ -603,7 +613,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
603
613
|
if (!document.hasFocus || document.hasFocus()) {
|
604
614
|
this.focus();
|
605
615
|
} else {
|
606
|
-
this.trigger(
|
616
|
+
this.trigger('focusin');
|
607
617
|
}
|
608
618
|
});
|
609
619
|
}
|
@@ -611,21 +621,21 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
611
621
|
}
|
612
622
|
|
613
623
|
function visit(app, url) {
|
614
|
-
var router = app.__container__.lookup(
|
624
|
+
var router = app.__container__.lookup('router:main');
|
615
625
|
var shouldHandleURL = false;
|
616
626
|
|
617
627
|
app.boot().then(function () {
|
618
628
|
router.location.setURL(url);
|
619
629
|
|
620
630
|
if (shouldHandleURL) {
|
621
|
-
_emberMetalRun_loop["default"](app.__deprecatedInstance__,
|
631
|
+
_emberMetalRun_loop["default"](app.__deprecatedInstance__, 'handleURL', url);
|
622
632
|
}
|
623
633
|
});
|
624
634
|
|
625
635
|
if (app._readinessDeferrals > 0) {
|
626
|
-
router[
|
627
|
-
_emberMetalRun_loop["default"](app,
|
628
|
-
delete router[
|
636
|
+
router['initialURL'] = url;
|
637
|
+
_emberMetalRun_loop["default"](app, 'advanceReadiness');
|
638
|
+
delete router['initialURL'];
|
629
639
|
} else {
|
630
640
|
shouldHandleURL = true;
|
631
641
|
}
|
@@ -635,23 +645,23 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
635
645
|
|
636
646
|
function click(app, selector, context) {
|
637
647
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
638
|
-
_emberMetalRun_loop["default"]($el,
|
648
|
+
_emberMetalRun_loop["default"]($el, 'mousedown');
|
639
649
|
|
640
650
|
focus($el);
|
641
651
|
|
642
|
-
_emberMetalRun_loop["default"]($el,
|
643
|
-
_emberMetalRun_loop["default"]($el,
|
652
|
+
_emberMetalRun_loop["default"]($el, 'mouseup');
|
653
|
+
_emberMetalRun_loop["default"]($el, 'click');
|
644
654
|
|
645
655
|
return app.testHelpers.wait();
|
646
656
|
}
|
647
657
|
|
648
658
|
function check(app, selector, context) {
|
649
659
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
650
|
-
var type = $el.prop(
|
660
|
+
var type = $el.prop('type');
|
651
661
|
|
652
|
-
_emberMetalCore["default"].assert(
|
662
|
+
_emberMetalCore["default"].assert('To check \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
|
653
663
|
|
654
|
-
if (!$el.prop(
|
664
|
+
if (!$el.prop('checked')) {
|
655
665
|
app.testHelpers.click(selector, context);
|
656
666
|
}
|
657
667
|
|
@@ -660,11 +670,11 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
660
670
|
|
661
671
|
function uncheck(app, selector, context) {
|
662
672
|
var $el = app.testHelpers.findWithAssert(selector, context);
|
663
|
-
var type = $el.prop(
|
673
|
+
var type = $el.prop('type');
|
664
674
|
|
665
|
-
_emberMetalCore["default"].assert(
|
675
|
+
_emberMetalCore["default"].assert('To uncheck \'' + selector + '\', the input must be a checkbox', type === 'checkbox');
|
666
676
|
|
667
|
-
if ($el.prop(
|
677
|
+
if ($el.prop('checked')) {
|
668
678
|
app.testHelpers.click(selector, context);
|
669
679
|
}
|
670
680
|
|
@@ -706,7 +716,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
706
716
|
|
707
717
|
var event = _emberViewsSystemJquery["default"].Event(type, options);
|
708
718
|
|
709
|
-
_emberMetalRun_loop["default"]($el,
|
719
|
+
_emberMetalRun_loop["default"]($el, 'trigger', event);
|
710
720
|
|
711
721
|
return app.testHelpers.wait();
|
712
722
|
}
|
@@ -714,7 +724,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
714
724
|
function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) {
|
715
725
|
var context, type;
|
716
726
|
|
717
|
-
if (typeof keyCode ===
|
727
|
+
if (typeof keyCode === 'undefined') {
|
718
728
|
context = null;
|
719
729
|
keyCode = typeOrKeyCode;
|
720
730
|
type = contextOrType;
|
@@ -728,7 +738,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
728
738
|
|
729
739
|
function fillIn(app, selector, contextOrText, text) {
|
730
740
|
var $el, context;
|
731
|
-
if (typeof text ===
|
741
|
+
if (typeof text === 'undefined') {
|
732
742
|
text = contextOrText;
|
733
743
|
} else {
|
734
744
|
context = contextOrText;
|
@@ -751,7 +761,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
751
761
|
|
752
762
|
function find(app, selector, context) {
|
753
763
|
var $el;
|
754
|
-
context = context || _emberMetalProperty_get.get(app,
|
764
|
+
context = context || _emberMetalProperty_get.get(app, 'rootElement');
|
755
765
|
$el = app.$(selector, context);
|
756
766
|
|
757
767
|
return $el;
|
@@ -765,7 +775,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
765
775
|
return new _emberRuntimeExtRsvp["default"].Promise(function (resolve) {
|
766
776
|
// Every 10ms, poll for the async thing to have finished
|
767
777
|
var watcher = setInterval(function () {
|
768
|
-
var router = app.__container__.lookup(
|
778
|
+
var router = app.__container__.lookup('router:main');
|
769
779
|
|
770
780
|
// 1. If the router is loading, keep polling
|
771
781
|
var routerIsLoading = router.router && !!router.router.activeTransition;
|
@@ -816,7 +826,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
816
826
|
@return {RSVP.Promise}
|
817
827
|
@public
|
818
828
|
*/
|
819
|
-
asyncHelper(
|
829
|
+
asyncHelper('visit', visit);
|
820
830
|
|
821
831
|
/**
|
822
832
|
Clicks an element and triggers any actions triggered by the element's `click`
|
@@ -835,7 +845,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
835
845
|
@return {RSVP.Promise}
|
836
846
|
@public
|
837
847
|
*/
|
838
|
-
asyncHelper(
|
848
|
+
asyncHelper('click', click);
|
839
849
|
|
840
850
|
/**
|
841
851
|
Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
|
@@ -856,7 +866,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
856
866
|
@since 1.5.0
|
857
867
|
@public
|
858
868
|
*/
|
859
|
-
asyncHelper(
|
869
|
+
asyncHelper('keyEvent', keyEvent);
|
860
870
|
|
861
871
|
/**
|
862
872
|
Fills in an input element with some text.
|
@@ -876,7 +886,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
876
886
|
@return {RSVP.Promise}
|
877
887
|
@public
|
878
888
|
*/
|
879
|
-
asyncHelper(
|
889
|
+
asyncHelper('fillIn', fillIn);
|
880
890
|
|
881
891
|
/**
|
882
892
|
Finds an element in the context of the app's container element. A simple alias
|
@@ -893,7 +903,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
893
903
|
@return {Object} jQuery object representing the results of the query
|
894
904
|
@public
|
895
905
|
*/
|
896
|
-
helper(
|
906
|
+
helper('find', find);
|
897
907
|
|
898
908
|
/**
|
899
909
|
Like `find`, but throws an error if the element selector returns no results.
|
@@ -911,7 +921,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
911
921
|
@throws {Error} throws error if jQuery object returned has a length of 0
|
912
922
|
@public
|
913
923
|
*/
|
914
|
-
helper(
|
924
|
+
helper('findWithAssert', findWithAssert);
|
915
925
|
|
916
926
|
/**
|
917
927
|
Causes the run loop to process any pending events. This is used to ensure that
|
@@ -937,8 +947,8 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
937
947
|
@return {RSVP.Promise}
|
938
948
|
@public
|
939
949
|
*/
|
940
|
-
asyncHelper(
|
941
|
-
asyncHelper(
|
950
|
+
asyncHelper('wait', wait);
|
951
|
+
asyncHelper('andThen', andThen);
|
942
952
|
|
943
953
|
/**
|
944
954
|
Returns the currently active route name.
|
@@ -958,7 +968,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
958
968
|
@since 1.5.0
|
959
969
|
@public
|
960
970
|
*/
|
961
|
-
helper(
|
971
|
+
helper('currentRouteName', currentRouteName);
|
962
972
|
|
963
973
|
/**
|
964
974
|
Returns the current path.
|
@@ -978,7 +988,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
978
988
|
@since 1.5.0
|
979
989
|
@public
|
980
990
|
*/
|
981
|
-
helper(
|
991
|
+
helper('currentPath', currentPath);
|
982
992
|
|
983
993
|
/**
|
984
994
|
Returns the current URL.
|
@@ -998,7 +1008,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
998
1008
|
@since 1.5.0
|
999
1009
|
@public
|
1000
1010
|
*/
|
1001
|
-
helper(
|
1011
|
+
helper('currentURL', currentURL);
|
1002
1012
|
|
1003
1013
|
/**
|
1004
1014
|
Pauses the current test - this is useful for debugging while testing or for test-driving.
|
@@ -1018,7 +1028,7 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
1018
1028
|
@return {Object} A promise that will never resolve
|
1019
1029
|
@public
|
1020
1030
|
*/
|
1021
|
-
helper(
|
1031
|
+
helper('pauseTest', pauseTest);
|
1022
1032
|
|
1023
1033
|
/**
|
1024
1034
|
Triggers the given DOM event on the element identified by the provided selector.
|
@@ -1045,9 +1055,10 @@ enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/pro
|
|
1045
1055
|
@since 1.5.0
|
1046
1056
|
@public
|
1047
1057
|
*/
|
1048
|
-
asyncHelper(
|
1058
|
+
asyncHelper('triggerEvent', triggerEvent);
|
1049
1059
|
});
|
1050
1060
|
enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load'], function (exports, _emberRuntimeSystemLazy_load) {
|
1061
|
+
'use strict';
|
1051
1062
|
|
1052
1063
|
var name = 'deferReadiness in `testing` mode';
|
1053
1064
|
|
@@ -1066,6 +1077,8 @@ enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load
|
|
1066
1077
|
});
|
1067
1078
|
});
|
1068
1079
|
enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember-testing/adapters/qunit", "ember-views/system/jquery"], function (exports, _emberMetalCore, _emberTestingAdaptersQunit, _emberViewsSystemJquery) {
|
1080
|
+
"use strict";
|
1081
|
+
|
1069
1082
|
exports["default"] = setupForTesting;
|
1070
1083
|
|
1071
1084
|
var Test, requests;
|
@@ -1099,7 +1112,7 @@ enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember
|
|
1099
1112
|
|
1100
1113
|
function setupForTesting() {
|
1101
1114
|
if (!Test) {
|
1102
|
-
Test = requireModule(
|
1115
|
+
Test = requireModule('ember-testing/test')['default'];
|
1103
1116
|
}
|
1104
1117
|
|
1105
1118
|
_emberMetalCore["default"].testing = true;
|
@@ -1112,15 +1125,16 @@ enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember
|
|
1112
1125
|
requests = [];
|
1113
1126
|
Test.pendingAjaxRequests = requests.length;
|
1114
1127
|
|
1115
|
-
_emberViewsSystemJquery["default"](document).off(
|
1116
|
-
_emberViewsSystemJquery["default"](document).off(
|
1117
|
-
_emberViewsSystemJquery["default"](document).on(
|
1118
|
-
_emberViewsSystemJquery["default"](document).on(
|
1128
|
+
_emberViewsSystemJquery["default"](document).off('ajaxSend', incrementAjaxPendingRequests);
|
1129
|
+
_emberViewsSystemJquery["default"](document).off('ajaxComplete', decrementAjaxPendingRequests);
|
1130
|
+
_emberViewsSystemJquery["default"](document).on('ajaxSend', incrementAjaxPendingRequests);
|
1131
|
+
_emberViewsSystemJquery["default"](document).on('ajaxComplete', decrementAjaxPendingRequests);
|
1119
1132
|
}
|
1120
1133
|
});
|
1121
1134
|
|
1122
1135
|
// import Test from "ember-testing/test"; // ES6TODO: fix when cycles are supported
|
1123
1136
|
enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/system/jquery", "ember-metal/environment"], function (exports, _emberMetalCore, _emberViewsSystemJquery, _emberMetalEnvironment) {
|
1137
|
+
"use strict";
|
1124
1138
|
|
1125
1139
|
/**
|
1126
1140
|
@module ember
|
@@ -1138,7 +1152,7 @@ enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/sys
|
|
1138
1152
|
@method testCheckboxClick
|
1139
1153
|
*/
|
1140
1154
|
function testCheckboxClick(handler) {
|
1141
|
-
$(
|
1155
|
+
$('<input type="checkbox">').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove();
|
1142
1156
|
}
|
1143
1157
|
|
1144
1158
|
if (_emberMetalEnvironment["default"].hasDOM) {
|
@@ -1172,6 +1186,7 @@ enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/sys
|
|
1172
1186
|
}
|
1173
1187
|
});
|
1174
1188
|
enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_loop", "ember-metal/platform/create", "ember-runtime/ext/rsvp", "ember-testing/setup_for_testing", "ember-application/system/application"], function (exports, _emberMetalCore, _emberMetalRun_loop, _emberMetalPlatformCreate, _emberRuntimeExtRsvp, _emberTestingSetup_for_testing, _emberApplicationSystemApplication) {
|
1189
|
+
"use strict";
|
1175
1190
|
|
1176
1191
|
/**
|
1177
1192
|
@module ember
|
@@ -1511,7 +1526,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1511
1526
|
this.testing = true;
|
1512
1527
|
|
1513
1528
|
this.Router.reopen({
|
1514
|
-
location:
|
1529
|
+
location: 'none'
|
1515
1530
|
});
|
1516
1531
|
},
|
1517
1532
|
|
@@ -1548,6 +1563,13 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1548
1563
|
this.helperContainer = window;
|
1549
1564
|
}
|
1550
1565
|
|
1566
|
+
this.reopen({
|
1567
|
+
willDestroy: function () {
|
1568
|
+
this._super.apply(this, arguments);
|
1569
|
+
this.removeTestHelpers();
|
1570
|
+
}
|
1571
|
+
});
|
1572
|
+
|
1551
1573
|
this.testHelpers = {};
|
1552
1574
|
for (var name in helpers) {
|
1553
1575
|
this.originalMethods[name] = this.helperContainer[name];
|
@@ -1577,6 +1599,7 @@ enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_lo
|
|
1577
1599
|
|
1578
1600
|
for (var name in helpers) {
|
1579
1601
|
this.helperContainer[name] = this.originalMethods[name];
|
1602
|
+
delete Test.Promise.prototype[name];
|
1580
1603
|
delete this.testHelpers[name];
|
1581
1604
|
delete this.originalMethods[name];
|
1582
1605
|
}
|