ember-source 2.15.0.beta.1 → 2.15.0.beta.2
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-runtime.js +130 -192
- data/dist/ember-template-compiler.js +16 -25
- data/dist/ember-testing.js +10 -12
- data/dist/ember-tests.js +122 -25
- data/dist/ember-tests.prod.js +122 -25
- data/dist/ember.debug.js +233 -223
- data/dist/ember.min.js +437 -437
- data/dist/ember.prod.js +341 -305
- metadata +3 -3
data/dist/ember-testing.js
CHANGED
@@ -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.15.0-beta.
|
9
|
+
* @version 2.15.0-beta.2
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -228,6 +228,7 @@ enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console'
|
|
228
228
|
@public
|
229
229
|
@static
|
230
230
|
@method registerDeprecationHandler
|
231
|
+
@for Ember.Debug
|
231
232
|
@param handler {Function} A function to handle deprecation calls.
|
232
233
|
@since 2.1.0
|
233
234
|
*/
|
@@ -414,13 +415,7 @@ enifed("ember-debug/error", ["exports", "ember-babel"], function (exports, _embe
|
|
414
415
|
}
|
415
416
|
|
416
417
|
var error = Error.call(_this, message);
|
417
|
-
|
418
|
-
if (Error.captureStackTrace) {
|
419
|
-
Error.captureStackTrace(_this, EmberError);
|
420
|
-
} else {
|
421
|
-
_this.stack = error.stack;
|
422
|
-
}
|
423
|
-
|
418
|
+
_this.stack = error.stack;
|
424
419
|
_this.description = error.description;
|
425
420
|
_this.fileName = error.fileName;
|
426
421
|
_this.lineNumber = error.lineNumber;
|
@@ -891,6 +886,7 @@ enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate',
|
|
891
886
|
@public
|
892
887
|
@static
|
893
888
|
@method registerWarnHandler
|
889
|
+
@for Ember.Debug
|
894
890
|
@param handler {Function} A function to handle warnings.
|
895
891
|
@since 2.1.0
|
896
892
|
*/
|
@@ -2321,16 +2317,18 @@ enifed('ember-testing/test/promise', ['exports', 'ember-babel', 'ember-runtime',
|
|
2321
2317
|
return _this;
|
2322
2318
|
}
|
2323
2319
|
|
2324
|
-
TestPromise.prototype.then = function then(
|
2320
|
+
TestPromise.prototype.then = function then(_onFulfillment) {
|
2325
2321
|
var _RSVP$Promise$prototy;
|
2326
2322
|
|
2323
|
+
var onFulfillment = typeof _onFulfillment === 'function' ? function (result) {
|
2324
|
+
return isolate(_onFulfillment, result);
|
2325
|
+
} : undefined;
|
2326
|
+
|
2327
2327
|
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
2328
2328
|
args[_key - 1] = arguments[_key];
|
2329
2329
|
}
|
2330
2330
|
|
2331
|
-
return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this,
|
2332
|
-
return isolate(onFulfillment, result);
|
2333
|
-
}].concat(args));
|
2331
|
+
return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this, onFulfillment].concat(args));
|
2334
2332
|
};
|
2335
2333
|
|
2336
2334
|
return TestPromise;
|
data/dist/ember-tests.js
CHANGED
@@ -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.15.0-beta.
|
9
|
+
* @version 2.15.0-beta.2
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -1875,13 +1875,13 @@ enifed('ember-application/tests/system/application_instance_test', ['ember-babel
|
|
1875
1875
|
return chatEngineInstance.boot().then(function () {
|
1876
1876
|
assert.ok(true, 'boot successful');
|
1877
1877
|
|
1878
|
-
var registrations = ['route:basic', '
|
1878
|
+
var registrations = ['route:basic', 'service:-routing', 'service:-glimmer-environment'];
|
1879
1879
|
|
1880
1880
|
registrations.forEach(function (key) {
|
1881
1881
|
assert.strictEqual(chatEngineInstance.resolveRegistration(key), appInstance.resolveRegistration(key), 'Engine and parent app share registrations for \'' + key + '\'');
|
1882
1882
|
});
|
1883
1883
|
|
1884
|
-
var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', '-environment:main', 'service:-document'];
|
1884
|
+
var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', '-environment:main', 'service:-document', 'event_dispatcher:main'];
|
1885
1885
|
|
1886
1886
|
var env = appInstance.lookup('-environment:main');
|
1887
1887
|
singletons.push(env.isInteractive ? 'renderer:-dom' : 'renderer:-inert');
|
@@ -32430,6 +32430,50 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
32430
32430
|
});
|
32431
32431
|
};
|
32432
32432
|
|
32433
|
+
_class4.prototype['@test it declares the event dispatcher as a singleton'] = function testItDeclaresTheEventDispatcherAsASingleton() {
|
32434
|
+
var _this13 = this;
|
32435
|
+
|
32436
|
+
this.router.map(function () {
|
32437
|
+
this.route('engine-event-dispatcher-singleton');
|
32438
|
+
});
|
32439
|
+
|
32440
|
+
var controller = void 0;
|
32441
|
+
var component = void 0;
|
32442
|
+
|
32443
|
+
this.add('controller:engine-event-dispatcher-singleton', _emberRuntime.Controller.extend({
|
32444
|
+
init: function () {
|
32445
|
+
this._super.apply(this, arguments);
|
32446
|
+
controller = this;
|
32447
|
+
}
|
32448
|
+
}));
|
32449
|
+
this.addTemplate('engine-event-dispatcher-singleton', '{{mount "foo"}}');
|
32450
|
+
|
32451
|
+
this.add('engine:foo', _emberApplication.Engine.extend({
|
32452
|
+
router: null,
|
32453
|
+
init: function () {
|
32454
|
+
this._super.apply(this, arguments);
|
32455
|
+
this.register('template:application', (0, _helpers.compile)('<h2>Foo Engine: {{tagless-component}}</h2>', { moduleName: 'application' }));
|
32456
|
+
this.register('component:tagless-component', _helpers.Component.extend({
|
32457
|
+
tagName: "",
|
32458
|
+
init: function () {
|
32459
|
+
this._super.apply(this, arguments);
|
32460
|
+
component = this;
|
32461
|
+
}
|
32462
|
+
}));
|
32463
|
+
this.register('template:components/tagless-component', (0, _helpers.compile)('Tagless Component', { moduleName: 'components/tagless-component' }));
|
32464
|
+
}
|
32465
|
+
}));
|
32466
|
+
|
32467
|
+
return this.visit('/engine-event-dispatcher-singleton').then(function () {
|
32468
|
+
_this13.assertComponentElement(_this13.firstChild, { content: '<h2>Foo Engine: Tagless Component</h2>' });
|
32469
|
+
|
32470
|
+
var controllerOwnerEventDispatcher = (0, _emberUtils.getOwner)(controller).lookup('event_dispatcher:main');
|
32471
|
+
var taglessComponentOwnerEventDispatcher = (0, _emberUtils.getOwner)(component).lookup('event_dispatcher:main');
|
32472
|
+
|
32473
|
+
_this13.assert.strictEqual(controllerOwnerEventDispatcher, taglessComponentOwnerEventDispatcher);
|
32474
|
+
});
|
32475
|
+
};
|
32476
|
+
|
32433
32477
|
return _class4;
|
32434
32478
|
}(_testCase.ApplicationTest));
|
32435
32479
|
|
@@ -32440,20 +32484,20 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
32440
32484
|
function _class5() {
|
32441
32485
|
(0, _emberBabel.classCallCheck)(this, _class5);
|
32442
32486
|
|
32443
|
-
var
|
32487
|
+
var _this14 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTest2.call(this));
|
32444
32488
|
|
32445
|
-
|
32489
|
+
_this14.add('engine:paramEngine', _emberApplication.Engine.extend({
|
32446
32490
|
router: null,
|
32447
32491
|
init: function () {
|
32448
32492
|
this._super.apply(this, arguments);
|
32449
32493
|
this.register('template:application', (0, _helpers.compile)('<h2>Param Engine: {{model.foo}}</h2>', { moduleName: 'application' }));
|
32450
32494
|
}
|
32451
32495
|
}));
|
32452
|
-
return
|
32496
|
+
return _this14;
|
32453
32497
|
}
|
32454
32498
|
|
32455
32499
|
_class5.prototype['@test it renders with static parameters'] = function testItRendersWithStaticParameters(assert) {
|
32456
|
-
var
|
32500
|
+
var _this15 = this;
|
32457
32501
|
|
32458
32502
|
this.router.map(function () {
|
32459
32503
|
this.route('engine-params-static');
|
@@ -32461,12 +32505,12 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
32461
32505
|
this.addTemplate('engine-params-static', '{{mount "paramEngine" model=(hash foo="bar")}}');
|
32462
32506
|
|
32463
32507
|
return this.visit('/engine-params-static').then(function () {
|
32464
|
-
|
32508
|
+
_this15.assertComponentElement(_this15.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
32465
32509
|
});
|
32466
32510
|
};
|
32467
32511
|
|
32468
32512
|
_class5.prototype['@test it renders with bound parameters'] = function testItRendersWithBoundParameters(assert) {
|
32469
|
-
var
|
32513
|
+
var _this16 = this;
|
32470
32514
|
|
32471
32515
|
this.router.map(function () {
|
32472
32516
|
this.route('engine-params-bound');
|
@@ -32482,48 +32526,48 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
32482
32526
|
this.addTemplate('engine-params-bound', '{{mount "paramEngine" model=(hash foo=boundParamValue)}}');
|
32483
32527
|
|
32484
32528
|
return this.visit('/engine-params-bound').then(function () {
|
32485
|
-
|
32529
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
32486
32530
|
|
32487
|
-
|
32531
|
+
_this16.runTask(function () {
|
32488
32532
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
32489
32533
|
});
|
32490
32534
|
|
32491
|
-
|
32535
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
32492
32536
|
|
32493
|
-
|
32537
|
+
_this16.runTask(function () {
|
32494
32538
|
return (0, _emberMetal.set)(controller, 'boundParamValue', undefined);
|
32495
32539
|
});
|
32496
32540
|
|
32497
|
-
|
32541
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
32498
32542
|
|
32499
|
-
|
32543
|
+
_this16.runTask(function () {
|
32500
32544
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
32501
32545
|
});
|
32502
32546
|
|
32503
|
-
|
32547
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
32504
32548
|
|
32505
|
-
|
32549
|
+
_this16.runTask(function () {
|
32506
32550
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'baz');
|
32507
32551
|
});
|
32508
32552
|
|
32509
|
-
|
32553
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: baz</h2>' });
|
32510
32554
|
|
32511
|
-
|
32555
|
+
_this16.runTask(function () {
|
32512
32556
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
32513
32557
|
});
|
32514
32558
|
|
32515
|
-
|
32559
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
32516
32560
|
|
32517
|
-
|
32561
|
+
_this16.runTask(function () {
|
32518
32562
|
return (0, _emberMetal.set)(controller, 'boundParamValue', null);
|
32519
32563
|
});
|
32520
32564
|
|
32521
|
-
|
32565
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
32522
32566
|
});
|
32523
32567
|
};
|
32524
32568
|
|
32525
32569
|
_class5.prototype['@test it renders contextual components passed as parameter values'] = function testItRendersContextualComponentsPassedAsParameterValues(assert) {
|
32526
|
-
var
|
32570
|
+
var _this17 = this;
|
32527
32571
|
|
32528
32572
|
this.router.map(function () {
|
32529
32573
|
this.route('engine-params-contextual-component');
|
@@ -32546,7 +32590,7 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
32546
32590
|
this.addTemplate('engine-params-contextual-component', '{{mount "componentParamEngine" model=(hash foo=(component "foo-component"))}}');
|
32547
32591
|
|
32548
32592
|
return this.visit('/engine-params-contextual-component').then(function () {
|
32549
|
-
|
32593
|
+
_this17.assertComponentElement(_this17.firstChild.firstChild, { content: 'foo-component rendered! - rendered app-bar-component from the app' });
|
32550
32594
|
});
|
32551
32595
|
};
|
32552
32596
|
|
@@ -57820,10 +57864,20 @@ enifed('ember-runtime/tests/suites/mutable_array/insertAt', ['exports', 'ember-r
|
|
57820
57864
|
var after = [before[0], item, before[1], before[2]];
|
57821
57865
|
var obj = this.newObject(before);
|
57822
57866
|
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
57867
|
+
var objectAtCalls = [];
|
57868
|
+
|
57869
|
+
var objectAt = obj.objectAt;
|
57870
|
+
obj.objectAt = function (ix) {
|
57871
|
+
objectAtCalls.push(ix);
|
57872
|
+
return objectAt.call(obj, ix);
|
57873
|
+
};
|
57823
57874
|
|
57824
57875
|
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
57825
57876
|
|
57877
|
+
objectAtCalls.splice(0, objectAtCalls.length);
|
57878
|
+
|
57826
57879
|
obj.insertAt(1, item);
|
57880
|
+
deepEqual(objectAtCalls, [], 'objectAt is not called when only inserting items');
|
57827
57881
|
|
57828
57882
|
deepEqual(this.toArray(obj), after, 'post item results');
|
57829
57883
|
equal((0, _emberMetal.get)(obj, 'length'), after.length, 'length');
|
@@ -58009,6 +58063,28 @@ enifed('ember-runtime/tests/suites/mutable_array/pushObject', ['exports', 'ember
|
|
58009
58063
|
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject');
|
58010
58064
|
});
|
58011
58065
|
|
58066
|
+
suite.test('[A,B,C,C].pushObject(A) => [A,B,C,C] + notify', function () {
|
58067
|
+
var before = this.newFixture(3);
|
58068
|
+
var item = before[2]; // note same object as current tail. should end up twice
|
58069
|
+
var after = [before[0], before[1], before[2], item];
|
58070
|
+
var obj = this.newObject(before);
|
58071
|
+
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
58072
|
+
|
58073
|
+
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
58074
|
+
|
58075
|
+
obj.pushObject(item);
|
58076
|
+
|
58077
|
+
deepEqual(this.toArray(obj), after, 'post item results');
|
58078
|
+
equal((0, _emberMetal.get)(obj, 'length'), after.length, 'length');
|
58079
|
+
|
58080
|
+
equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
|
58081
|
+
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
58082
|
+
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
58083
|
+
|
58084
|
+
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject');
|
58085
|
+
equal(observer.validate('lastObject'), true, 'should have notified lastObject');
|
58086
|
+
});
|
58087
|
+
|
58012
58088
|
exports.default = suite;
|
58013
58089
|
});
|
58014
58090
|
QUnit.module('ESLint | ember-runtime/tests/suites/mutable_array/pushObject.js');
|
@@ -58386,6 +58462,27 @@ enifed('ember-runtime/tests/suites/mutable_array/replace', ['exports', 'ember-ru
|
|
58386
58462
|
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject once');
|
58387
58463
|
});
|
58388
58464
|
|
58465
|
+
suite.test('[A,B,C,D].replace(-1,1) => [A,B,C] + notify', function () {
|
58466
|
+
var before = this.newFixture(4);
|
58467
|
+
var after = [before[0], before[1], before[2]];
|
58468
|
+
|
58469
|
+
var obj = this.newObject(before);
|
58470
|
+
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
58471
|
+
|
58472
|
+
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
58473
|
+
|
58474
|
+
obj.replace(-1, 1);
|
58475
|
+
|
58476
|
+
deepEqual(this.toArray(obj), after, 'post item results');
|
58477
|
+
|
58478
|
+
equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
|
58479
|
+
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
58480
|
+
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
58481
|
+
equal(observer.timesCalled('lastObject'), 1, 'should have notified lastObject once');
|
58482
|
+
|
58483
|
+
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject once');
|
58484
|
+
});
|
58485
|
+
|
58389
58486
|
suite.test('Adding object should notify enumerable observer', function () {
|
58390
58487
|
var fixtures = this.newFixture(4);
|
58391
58488
|
var obj = this.newObject(fixtures);
|
@@ -58660,7 +58757,7 @@ enifed('ember-runtime/tests/suites/mutable_array/unshiftObject', ['exports', 'em
|
|
58660
58757
|
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
58661
58758
|
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
58662
58759
|
|
58663
|
-
equal(observer.validate('firstObject'),
|
58760
|
+
equal(observer.validate('firstObject'), true, 'should have notified firstObject');
|
58664
58761
|
equal(observer.validate('lastObject'), false, 'should NOT have notified lastObject');
|
58665
58762
|
});
|
58666
58763
|
|
data/dist/ember-tests.prod.js
CHANGED
@@ -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.15.0-beta.
|
9
|
+
* @version 2.15.0-beta.2
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -1632,11 +1632,11 @@ enifed('ember-application/tests/system/application_instance_test', ['ember-babel
|
|
1632
1632
|
return chatEngineInstance.boot().then(function () {
|
1633
1633
|
assert.ok(true, 'boot successful');
|
1634
1634
|
|
1635
|
-
['route:basic', '
|
1635
|
+
['route:basic', 'service:-routing', 'service:-glimmer-environment'].forEach(function (key) {
|
1636
1636
|
assert.strictEqual(chatEngineInstance.resolveRegistration(key), appInstance.resolveRegistration(key), 'Engine and parent app share registrations for \'' + key + '\'');
|
1637
1637
|
});
|
1638
1638
|
|
1639
|
-
var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', '-environment:main', 'service:-document'];
|
1639
|
+
var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', '-environment:main', 'service:-document', 'event_dispatcher:main'];
|
1640
1640
|
|
1641
1641
|
var env = appInstance.lookup('-environment:main');
|
1642
1642
|
singletons.push(env.isInteractive ? 'renderer:-dom' : 'renderer:-inert');
|
@@ -30613,6 +30613,50 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
30613
30613
|
});
|
30614
30614
|
};
|
30615
30615
|
|
30616
|
+
_class4.prototype['@test it declares the event dispatcher as a singleton'] = function () {
|
30617
|
+
var _this13 = this;
|
30618
|
+
|
30619
|
+
this.router.map(function () {
|
30620
|
+
this.route('engine-event-dispatcher-singleton');
|
30621
|
+
});
|
30622
|
+
|
30623
|
+
var controller = void 0;
|
30624
|
+
var component = void 0;
|
30625
|
+
|
30626
|
+
this.add('controller:engine-event-dispatcher-singleton', _emberRuntime.Controller.extend({
|
30627
|
+
init: function () {
|
30628
|
+
this._super.apply(this, arguments);
|
30629
|
+
controller = this;
|
30630
|
+
}
|
30631
|
+
}));
|
30632
|
+
this.addTemplate('engine-event-dispatcher-singleton', '{{mount "foo"}}');
|
30633
|
+
|
30634
|
+
this.add('engine:foo', _emberApplication.Engine.extend({
|
30635
|
+
router: null,
|
30636
|
+
init: function () {
|
30637
|
+
this._super.apply(this, arguments);
|
30638
|
+
this.register('template:application', (0, _helpers.compile)('<h2>Foo Engine: {{tagless-component}}</h2>', { moduleName: 'application' }));
|
30639
|
+
this.register('component:tagless-component', _helpers.Component.extend({
|
30640
|
+
tagName: "",
|
30641
|
+
init: function () {
|
30642
|
+
this._super.apply(this, arguments);
|
30643
|
+
component = this;
|
30644
|
+
}
|
30645
|
+
}));
|
30646
|
+
this.register('template:components/tagless-component', (0, _helpers.compile)('Tagless Component', { moduleName: 'components/tagless-component' }));
|
30647
|
+
}
|
30648
|
+
}));
|
30649
|
+
|
30650
|
+
return this.visit('/engine-event-dispatcher-singleton').then(function () {
|
30651
|
+
_this13.assertComponentElement(_this13.firstChild, { content: '<h2>Foo Engine: Tagless Component</h2>' });
|
30652
|
+
|
30653
|
+
var controllerOwnerEventDispatcher = (0, _emberUtils.getOwner)(controller).lookup('event_dispatcher:main');
|
30654
|
+
var taglessComponentOwnerEventDispatcher = (0, _emberUtils.getOwner)(component).lookup('event_dispatcher:main');
|
30655
|
+
|
30656
|
+
_this13.assert.strictEqual(controllerOwnerEventDispatcher, taglessComponentOwnerEventDispatcher);
|
30657
|
+
});
|
30658
|
+
};
|
30659
|
+
|
30616
30660
|
return _class4;
|
30617
30661
|
}(_testCase.ApplicationTest));
|
30618
30662
|
|
@@ -30621,20 +30665,20 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
30621
30665
|
|
30622
30666
|
function _class5() {
|
30623
30667
|
|
30624
|
-
var
|
30668
|
+
var _this14 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTest2.call(this));
|
30625
30669
|
|
30626
|
-
|
30670
|
+
_this14.add('engine:paramEngine', _emberApplication.Engine.extend({
|
30627
30671
|
router: null,
|
30628
30672
|
init: function () {
|
30629
30673
|
this._super.apply(this, arguments);
|
30630
30674
|
this.register('template:application', (0, _helpers.compile)('<h2>Param Engine: {{model.foo}}</h2>', { moduleName: 'application' }));
|
30631
30675
|
}
|
30632
30676
|
}));
|
30633
|
-
return
|
30677
|
+
return _this14;
|
30634
30678
|
}
|
30635
30679
|
|
30636
30680
|
_class5.prototype['@test it renders with static parameters'] = function () {
|
30637
|
-
var
|
30681
|
+
var _this15 = this;
|
30638
30682
|
|
30639
30683
|
this.router.map(function () {
|
30640
30684
|
this.route('engine-params-static');
|
@@ -30642,12 +30686,12 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
30642
30686
|
this.addTemplate('engine-params-static', '{{mount "paramEngine" model=(hash foo="bar")}}');
|
30643
30687
|
|
30644
30688
|
return this.visit('/engine-params-static').then(function () {
|
30645
|
-
|
30689
|
+
_this15.assertComponentElement(_this15.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
30646
30690
|
});
|
30647
30691
|
};
|
30648
30692
|
|
30649
30693
|
_class5.prototype['@test it renders with bound parameters'] = function () {
|
30650
|
-
var
|
30694
|
+
var _this16 = this;
|
30651
30695
|
|
30652
30696
|
this.router.map(function () {
|
30653
30697
|
this.route('engine-params-bound');
|
@@ -30663,48 +30707,48 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
30663
30707
|
this.addTemplate('engine-params-bound', '{{mount "paramEngine" model=(hash foo=boundParamValue)}}');
|
30664
30708
|
|
30665
30709
|
return this.visit('/engine-params-bound').then(function () {
|
30666
|
-
|
30710
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
30667
30711
|
|
30668
|
-
|
30712
|
+
_this16.runTask(function () {
|
30669
30713
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
30670
30714
|
});
|
30671
30715
|
|
30672
|
-
|
30716
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
30673
30717
|
|
30674
|
-
|
30718
|
+
_this16.runTask(function () {
|
30675
30719
|
return (0, _emberMetal.set)(controller, 'boundParamValue', undefined);
|
30676
30720
|
});
|
30677
30721
|
|
30678
|
-
|
30722
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
30679
30723
|
|
30680
|
-
|
30724
|
+
_this16.runTask(function () {
|
30681
30725
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
30682
30726
|
});
|
30683
30727
|
|
30684
|
-
|
30728
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
30685
30729
|
|
30686
|
-
|
30730
|
+
_this16.runTask(function () {
|
30687
30731
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'baz');
|
30688
30732
|
});
|
30689
30733
|
|
30690
|
-
|
30734
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: baz</h2>' });
|
30691
30735
|
|
30692
|
-
|
30736
|
+
_this16.runTask(function () {
|
30693
30737
|
return (0, _emberMetal.set)(controller, 'boundParamValue', 'bar');
|
30694
30738
|
});
|
30695
30739
|
|
30696
|
-
|
30740
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: bar</h2>' });
|
30697
30741
|
|
30698
|
-
|
30742
|
+
_this16.runTask(function () {
|
30699
30743
|
return (0, _emberMetal.set)(controller, 'boundParamValue', null);
|
30700
30744
|
});
|
30701
30745
|
|
30702
|
-
|
30746
|
+
_this16.assertComponentElement(_this16.firstChild, { content: '<h2>Param Engine: </h2>' });
|
30703
30747
|
});
|
30704
30748
|
};
|
30705
30749
|
|
30706
30750
|
_class5.prototype['@test it renders contextual components passed as parameter values'] = function () {
|
30707
|
-
var
|
30751
|
+
var _this17 = this;
|
30708
30752
|
|
30709
30753
|
this.router.map(function () {
|
30710
30754
|
this.route('engine-params-contextual-component');
|
@@ -30727,7 +30771,7 @@ enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-util
|
|
30727
30771
|
this.addTemplate('engine-params-contextual-component', '{{mount "componentParamEngine" model=(hash foo=(component "foo-component"))}}');
|
30728
30772
|
|
30729
30773
|
return this.visit('/engine-params-contextual-component').then(function () {
|
30730
|
-
|
30774
|
+
_this17.assertComponentElement(_this17.firstChild.firstChild, { content: 'foo-component rendered! - rendered app-bar-component from the app' });
|
30731
30775
|
});
|
30732
30776
|
};
|
30733
30777
|
|
@@ -54010,10 +54054,20 @@ enifed('ember-runtime/tests/suites/mutable_array/insertAt', ['exports', 'ember-r
|
|
54010
54054
|
var after = [before[0], item, before[1], before[2]];
|
54011
54055
|
var obj = this.newObject(before);
|
54012
54056
|
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
54057
|
+
var objectAtCalls = [];
|
54058
|
+
|
54059
|
+
var objectAt = obj.objectAt;
|
54060
|
+
obj.objectAt = function (ix) {
|
54061
|
+
objectAtCalls.push(ix);
|
54062
|
+
return objectAt.call(obj, ix);
|
54063
|
+
};
|
54013
54064
|
|
54014
54065
|
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
54015
54066
|
|
54067
|
+
objectAtCalls.splice(0, objectAtCalls.length);
|
54068
|
+
|
54016
54069
|
obj.insertAt(1, item);
|
54070
|
+
deepEqual(objectAtCalls, [], 'objectAt is not called when only inserting items');
|
54017
54071
|
|
54018
54072
|
deepEqual(this.toArray(obj), after, 'post item results');
|
54019
54073
|
equal((0, _emberMetal.get)(obj, 'length'), after.length, 'length');
|
@@ -54186,6 +54240,28 @@ enifed('ember-runtime/tests/suites/mutable_array/pushObject', ['exports', 'ember
|
|
54186
54240
|
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject');
|
54187
54241
|
});
|
54188
54242
|
|
54243
|
+
suite.test('[A,B,C,C].pushObject(A) => [A,B,C,C] + notify', function () {
|
54244
|
+
var before = this.newFixture(3);
|
54245
|
+
var item = before[2]; // note same object as current tail. should end up twice
|
54246
|
+
var after = [before[0], before[1], before[2], item];
|
54247
|
+
var obj = this.newObject(before);
|
54248
|
+
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
54249
|
+
|
54250
|
+
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
54251
|
+
|
54252
|
+
obj.pushObject(item);
|
54253
|
+
|
54254
|
+
deepEqual(this.toArray(obj), after, 'post item results');
|
54255
|
+
equal((0, _emberMetal.get)(obj, 'length'), after.length, 'length');
|
54256
|
+
|
54257
|
+
equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
|
54258
|
+
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
54259
|
+
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
54260
|
+
|
54261
|
+
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject');
|
54262
|
+
equal(observer.validate('lastObject'), true, 'should have notified lastObject');
|
54263
|
+
});
|
54264
|
+
|
54189
54265
|
exports.default = suite;
|
54190
54266
|
});
|
54191
54267
|
enifed('ember-runtime/tests/suites/mutable_array/pushObjects', ['exports', 'ember-runtime/tests/suites/suite'], function (exports, _suite) {
|
@@ -54539,6 +54615,27 @@ enifed('ember-runtime/tests/suites/mutable_array/replace', ['exports', 'ember-ru
|
|
54539
54615
|
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject once');
|
54540
54616
|
});
|
54541
54617
|
|
54618
|
+
suite.test('[A,B,C,D].replace(-1,1) => [A,B,C] + notify', function () {
|
54619
|
+
var before = this.newFixture(4);
|
54620
|
+
var after = [before[0], before[1], before[2]];
|
54621
|
+
|
54622
|
+
var obj = this.newObject(before);
|
54623
|
+
var observer = this.newObserver(obj, '[]', '@each', 'length', 'firstObject', 'lastObject');
|
54624
|
+
|
54625
|
+
obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */
|
54626
|
+
|
54627
|
+
obj.replace(-1, 1);
|
54628
|
+
|
54629
|
+
deepEqual(this.toArray(obj), after, 'post item results');
|
54630
|
+
|
54631
|
+
equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
|
54632
|
+
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
54633
|
+
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
54634
|
+
equal(observer.timesCalled('lastObject'), 1, 'should have notified lastObject once');
|
54635
|
+
|
54636
|
+
equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject once');
|
54637
|
+
});
|
54638
|
+
|
54542
54639
|
suite.test('Adding object should notify enumerable observer', function () {
|
54543
54640
|
var fixtures = this.newFixture(4);
|
54544
54641
|
var obj = this.newObject(fixtures);
|
@@ -54787,7 +54884,7 @@ enifed('ember-runtime/tests/suites/mutable_array/unshiftObject', ['exports', 'em
|
|
54787
54884
|
equal(observer.timesCalled('@each'), 0, 'should not have notified @each once');
|
54788
54885
|
equal(observer.timesCalled('length'), 1, 'should have notified length once');
|
54789
54886
|
|
54790
|
-
equal(observer.validate('firstObject'),
|
54887
|
+
equal(observer.validate('firstObject'), true, 'should have notified firstObject');
|
54791
54888
|
equal(observer.validate('lastObject'), false, 'should NOT have notified lastObject');
|
54792
54889
|
});
|
54793
54890
|
|