ember-source 2.7.0.beta.3 → 2.7.0.beta.4

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.7.0-beta.3
9
+ * @version 2.7.0-beta.4
10
10
  */
11
11
 
12
12
  var enifed, requireModule, require, Ember;
@@ -1053,6 +1053,263 @@ enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime/ext/rsvp', 'ember-me
1053
1053
 
1054
1054
  exports.default = _emberRuntimeExtRsvp.default;
1055
1055
  });
1056
+ 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) {
1057
+ 'use strict';
1058
+
1059
+ /**
1060
+ @module ember
1061
+ @submodule ember-testing
1062
+ */
1063
+
1064
+ /**
1065
+ Loads a route, sets up any controllers, and renders any templates associated
1066
+ with the route as though a real user had triggered the route change while
1067
+ using your app.
1068
+
1069
+ Example:
1070
+
1071
+ ```javascript
1072
+ visit('posts/index').then(function() {
1073
+ // assert something
1074
+ });
1075
+ ```
1076
+
1077
+ @method visit
1078
+ @param {String} url the name of the route
1079
+ @return {RSVP.Promise}
1080
+ @public
1081
+ */
1082
+ _emberTestingTestHelpers.registerAsyncHelper('visit', _emberTestingHelpersVisit.default);
1083
+
1084
+ /**
1085
+ Clicks an element and triggers any actions triggered by the element's `click`
1086
+ event.
1087
+
1088
+ Example:
1089
+
1090
+ ```javascript
1091
+ click('.some-jQuery-selector').then(function() {
1092
+ // assert something
1093
+ });
1094
+ ```
1095
+
1096
+ @method click
1097
+ @param {String} selector jQuery selector for finding element on the DOM
1098
+ @return {RSVP.Promise}
1099
+ @public
1100
+ */
1101
+ _emberTestingTestHelpers.registerAsyncHelper('click', _emberTestingHelpersClick.default);
1102
+
1103
+ /**
1104
+ Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
1105
+
1106
+ Example:
1107
+
1108
+ ```javascript
1109
+ keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {
1110
+ // assert something
1111
+ });
1112
+ ```
1113
+
1114
+ @method keyEvent
1115
+ @param {String} selector jQuery selector for finding element on the DOM
1116
+ @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`
1117
+ @param {Number} keyCode the keyCode of the simulated key event
1118
+ @return {RSVP.Promise}
1119
+ @since 1.5.0
1120
+ @public
1121
+ */
1122
+ _emberTestingTestHelpers.registerAsyncHelper('keyEvent', _emberTestingHelpersKey_event.default);
1123
+
1124
+ /**
1125
+ Fills in an input element with some text.
1126
+
1127
+ Example:
1128
+
1129
+ ```javascript
1130
+ fillIn('#email', 'you@example.com').then(function() {
1131
+ // assert something
1132
+ });
1133
+ ```
1134
+
1135
+ @method fillIn
1136
+ @param {String} selector jQuery selector finding an input element on the DOM
1137
+ to fill text with
1138
+ @param {String} text text to place inside the input element
1139
+ @return {RSVP.Promise}
1140
+ @public
1141
+ */
1142
+ _emberTestingTestHelpers.registerAsyncHelper('fillIn', _emberTestingHelpersFill_in.default);
1143
+
1144
+ /**
1145
+ Finds an element in the context of the app's container element. A simple alias
1146
+ for `app.$(selector)`.
1147
+
1148
+ Example:
1149
+
1150
+ ```javascript
1151
+ var $el = find('.my-selector');
1152
+ ```
1153
+
1154
+ @method find
1155
+ @param {String} selector jQuery string selector for element lookup
1156
+ @return {Object} jQuery object representing the results of the query
1157
+ @public
1158
+ */
1159
+ _emberTestingTestHelpers.registerHelper('find', _emberTestingHelpersFind.default);
1160
+
1161
+ /**
1162
+ Like `find`, but throws an error if the element selector returns no results.
1163
+
1164
+ Example:
1165
+
1166
+ ```javascript
1167
+ var $el = findWithAssert('.doesnt-exist'); // throws error
1168
+ ```
1169
+
1170
+ @method findWithAssert
1171
+ @param {String} selector jQuery selector string for finding an element within
1172
+ the DOM
1173
+ @return {Object} jQuery object representing the results of the query
1174
+ @throws {Error} throws error if jQuery object returned has a length of 0
1175
+ @public
1176
+ */
1177
+ _emberTestingTestHelpers.registerHelper('findWithAssert', _emberTestingHelpersFind_with_assert.default);
1178
+
1179
+ /**
1180
+ Causes the run loop to process any pending events. This is used to ensure that
1181
+ any async operations from other helpers (or your assertions) have been processed.
1182
+
1183
+ This is most often used as the return value for the helper functions (see 'click',
1184
+ 'fillIn','visit',etc).
1185
+
1186
+ Example:
1187
+
1188
+ ```javascript
1189
+ Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
1190
+ visit('secured/path/here')
1191
+ .fillIn('#username', username)
1192
+ .fillIn('#password', password)
1193
+ .click('.submit')
1194
+
1195
+ return app.testHelpers.wait();
1196
+ });
1197
+
1198
+ @method wait
1199
+ @param {Object} value The value to be returned.
1200
+ @return {RSVP.Promise}
1201
+ @public
1202
+ */
1203
+ _emberTestingTestHelpers.registerAsyncHelper('wait', _emberTestingHelpersWait.default);
1204
+ _emberTestingTestHelpers.registerAsyncHelper('andThen', _emberTestingHelpersAnd_then.default);
1205
+
1206
+ /**
1207
+ Returns the currently active route name.
1208
+
1209
+ Example:
1210
+
1211
+ ```javascript
1212
+ function validateRouteName() {
1213
+ equal(currentRouteName(), 'some.path', "correct route was transitioned into.");
1214
+ }
1215
+
1216
+ visit('/some/path').then(validateRouteName)
1217
+ ```
1218
+
1219
+ @method currentRouteName
1220
+ @return {Object} The name of the currently active route.
1221
+ @since 1.5.0
1222
+ @public
1223
+ */
1224
+ _emberTestingTestHelpers.registerHelper('currentRouteName', _emberTestingHelpersCurrent_route_name.default);
1225
+
1226
+ /**
1227
+ Returns the current path.
1228
+
1229
+ Example:
1230
+
1231
+ ```javascript
1232
+ function validateURL() {
1233
+ equal(currentPath(), 'some.path.index', "correct path was transitioned into.");
1234
+ }
1235
+
1236
+ click('#some-link-id').then(validateURL);
1237
+ ```
1238
+
1239
+ @method currentPath
1240
+ @return {Object} The currently active path.
1241
+ @since 1.5.0
1242
+ @public
1243
+ */
1244
+ _emberTestingTestHelpers.registerHelper('currentPath', _emberTestingHelpersCurrent_path.default);
1245
+
1246
+ /**
1247
+ Returns the current URL.
1248
+
1249
+ Example:
1250
+
1251
+ ```javascript
1252
+ function validateURL() {
1253
+ equal(currentURL(), '/some/path', "correct URL was transitioned into.");
1254
+ }
1255
+
1256
+ click('#some-link-id').then(validateURL);
1257
+ ```
1258
+
1259
+ @method currentURL
1260
+ @return {Object} The currently active URL.
1261
+ @since 1.5.0
1262
+ @public
1263
+ */
1264
+ _emberTestingTestHelpers.registerHelper('currentURL', _emberTestingHelpersCurrent_url.default);
1265
+
1266
+ /**
1267
+ Pauses the current test - this is useful for debugging while testing or for test-driving.
1268
+ It allows you to inspect the state of your application at any point.
1269
+
1270
+ Example (The test will pause before clicking the button):
1271
+
1272
+ ```javascript
1273
+ visit('/')
1274
+ return pauseTest();
1275
+
1276
+ click('.btn');
1277
+ ```
1278
+
1279
+ @since 1.9.0
1280
+ @method pauseTest
1281
+ @return {Object} A promise that will never resolve
1282
+ @public
1283
+ */
1284
+ _emberTestingTestHelpers.registerAsyncHelper('pauseTest', _emberTestingHelpersPause_test.default);
1285
+
1286
+ /**
1287
+ Triggers the given DOM event on the element identified by the provided selector.
1288
+
1289
+ Example:
1290
+
1291
+ ```javascript
1292
+ triggerEvent('#some-elem-id', 'blur');
1293
+ ```
1294
+
1295
+ This is actually used internally by the `keyEvent` helper like so:
1296
+
1297
+ ```javascript
1298
+ triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 });
1299
+ ```
1300
+
1301
+ @method triggerEvent
1302
+ @param {String} selector jQuery selector for finding element on the DOM
1303
+ @param {String} [context] jQuery selector that will limit the selector
1304
+ argument to find only within the context's children
1305
+ @param {String} type The event type to be triggered.
1306
+ @param {Object} [options] The options to be passed to jQuery.Event.
1307
+ @return {RSVP.Promise}
1308
+ @since 1.5.0
1309
+ @public
1310
+ */
1311
+ _emberTestingTestHelpers.registerAsyncHelper('triggerEvent', _emberTestingHelpersTrigger_event.default);
1312
+ });
1056
1313
  enifed("ember-testing/helpers/and_then", ["exports"], function (exports) {
1057
1314
  "use strict";
1058
1315
 
@@ -1250,312 +1507,55 @@ enifed('ember-testing/helpers/visit', ['exports', 'ember-metal/run_loop'], funct
1250
1507
  });
1251
1508
 
1252
1509
  if (app._readinessDeferrals > 0) {
1253
- router['initialURL'] = url;
1254
- _emberMetalRun_loop.default(app, 'advanceReadiness');
1255
- delete router['initialURL'];
1256
- } else {
1257
- shouldHandleURL = true;
1258
- }
1259
-
1260
- return app.testHelpers.wait();
1261
- }
1262
- });
1263
- 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) {
1264
- 'use strict';
1265
-
1266
- exports.default = wait;
1267
-
1268
- function wait(app, value) {
1269
- return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
1270
- var router = app.__container__.lookup('router:main');
1271
-
1272
- // Every 10ms, poll for the async thing to have finished
1273
- var watcher = setInterval(function () {
1274
- // 1. If the router is loading, keep polling
1275
- var routerIsLoading = router.router && !!router.router.activeTransition;
1276
- if (routerIsLoading) {
1277
- return;
1278
- }
1279
-
1280
- // 2. If there are pending Ajax requests, keep polling
1281
- if (_emberTestingTestPending_requests.pendingRequests()) {
1282
- return;
1283
- }
1284
-
1285
- // 3. If there are scheduled timers or we are inside of a run loop, keep polling
1286
- if (_emberMetalRun_loop.default.hasScheduledTimers() || _emberMetalRun_loop.default.currentRunLoop) {
1287
- return;
1288
- }
1289
-
1290
- if (_emberTestingTestWaiters.checkWaiters()) {
1291
- return;
1292
- }
1293
-
1294
- // Stop polling
1295
- clearInterval(watcher);
1296
-
1297
- // Synchronously resolve the promise
1298
- _emberMetalRun_loop.default(null, resolve, value);
1299
- }, 10);
1300
- });
1301
- }
1302
- });
1303
- 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) {
1304
- 'use strict';
1305
-
1306
- /**
1307
- @module ember
1308
- @submodule ember-testing
1309
- */
1310
-
1311
- /**
1312
- Loads a route, sets up any controllers, and renders any templates associated
1313
- with the route as though a real user had triggered the route change while
1314
- using your app.
1315
-
1316
- Example:
1317
-
1318
- ```javascript
1319
- visit('posts/index').then(function() {
1320
- // assert something
1321
- });
1322
- ```
1323
-
1324
- @method visit
1325
- @param {String} url the name of the route
1326
- @return {RSVP.Promise}
1327
- @public
1328
- */
1329
- _emberTestingTestHelpers.registerAsyncHelper('visit', _emberTestingHelpersVisit.default);
1330
-
1331
- /**
1332
- Clicks an element and triggers any actions triggered by the element's `click`
1333
- event.
1334
-
1335
- Example:
1336
-
1337
- ```javascript
1338
- click('.some-jQuery-selector').then(function() {
1339
- // assert something
1340
- });
1341
- ```
1342
-
1343
- @method click
1344
- @param {String} selector jQuery selector for finding element on the DOM
1345
- @return {RSVP.Promise}
1346
- @public
1347
- */
1348
- _emberTestingTestHelpers.registerAsyncHelper('click', _emberTestingHelpersClick.default);
1349
-
1350
- /**
1351
- Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode
1352
-
1353
- Example:
1354
-
1355
- ```javascript
1356
- keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {
1357
- // assert something
1358
- });
1359
- ```
1360
-
1361
- @method keyEvent
1362
- @param {String} selector jQuery selector for finding element on the DOM
1363
- @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`
1364
- @param {Number} keyCode the keyCode of the simulated key event
1365
- @return {RSVP.Promise}
1366
- @since 1.5.0
1367
- @public
1368
- */
1369
- _emberTestingTestHelpers.registerAsyncHelper('keyEvent', _emberTestingHelpersKey_event.default);
1370
-
1371
- /**
1372
- Fills in an input element with some text.
1373
-
1374
- Example:
1375
-
1376
- ```javascript
1377
- fillIn('#email', 'you@example.com').then(function() {
1378
- // assert something
1379
- });
1380
- ```
1381
-
1382
- @method fillIn
1383
- @param {String} selector jQuery selector finding an input element on the DOM
1384
- to fill text with
1385
- @param {String} text text to place inside the input element
1386
- @return {RSVP.Promise}
1387
- @public
1388
- */
1389
- _emberTestingTestHelpers.registerAsyncHelper('fillIn', _emberTestingHelpersFill_in.default);
1390
-
1391
- /**
1392
- Finds an element in the context of the app's container element. A simple alias
1393
- for `app.$(selector)`.
1394
-
1395
- Example:
1396
-
1397
- ```javascript
1398
- var $el = find('.my-selector');
1399
- ```
1400
-
1401
- @method find
1402
- @param {String} selector jQuery string selector for element lookup
1403
- @return {Object} jQuery object representing the results of the query
1404
- @public
1405
- */
1406
- _emberTestingTestHelpers.registerHelper('find', _emberTestingHelpersFind.default);
1407
-
1408
- /**
1409
- Like `find`, but throws an error if the element selector returns no results.
1410
-
1411
- Example:
1412
-
1413
- ```javascript
1414
- var $el = findWithAssert('.doesnt-exist'); // throws error
1415
- ```
1416
-
1417
- @method findWithAssert
1418
- @param {String} selector jQuery selector string for finding an element within
1419
- the DOM
1420
- @return {Object} jQuery object representing the results of the query
1421
- @throws {Error} throws error if jQuery object returned has a length of 0
1422
- @public
1423
- */
1424
- _emberTestingTestHelpers.registerHelper('findWithAssert', _emberTestingHelpersFind_with_assert.default);
1425
-
1426
- /**
1427
- Causes the run loop to process any pending events. This is used to ensure that
1428
- any async operations from other helpers (or your assertions) have been processed.
1429
-
1430
- This is most often used as the return value for the helper functions (see 'click',
1431
- 'fillIn','visit',etc).
1432
-
1433
- Example:
1434
-
1435
- ```javascript
1436
- Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
1437
- visit('secured/path/here')
1438
- .fillIn('#username', username)
1439
- .fillIn('#password', password)
1440
- .click('.submit')
1441
-
1442
- return app.testHelpers.wait();
1443
- });
1444
-
1445
- @method wait
1446
- @param {Object} value The value to be returned.
1447
- @return {RSVP.Promise}
1448
- @public
1449
- */
1450
- _emberTestingTestHelpers.registerAsyncHelper('wait', _emberTestingHelpersWait.default);
1451
- _emberTestingTestHelpers.registerAsyncHelper('andThen', _emberTestingHelpersAnd_then.default);
1452
-
1453
- /**
1454
- Returns the currently active route name.
1455
-
1456
- Example:
1457
-
1458
- ```javascript
1459
- function validateRouteName() {
1460
- equal(currentRouteName(), 'some.path', "correct route was transitioned into.");
1461
- }
1462
-
1463
- visit('/some/path').then(validateRouteName)
1464
- ```
1465
-
1466
- @method currentRouteName
1467
- @return {Object} The name of the currently active route.
1468
- @since 1.5.0
1469
- @public
1470
- */
1471
- _emberTestingTestHelpers.registerHelper('currentRouteName', _emberTestingHelpersCurrent_route_name.default);
1472
-
1473
- /**
1474
- Returns the current path.
1475
-
1476
- Example:
1477
-
1478
- ```javascript
1479
- function validateURL() {
1480
- equal(currentPath(), 'some.path.index', "correct path was transitioned into.");
1481
- }
1482
-
1483
- click('#some-link-id').then(validateURL);
1484
- ```
1485
-
1486
- @method currentPath
1487
- @return {Object} The currently active path.
1488
- @since 1.5.0
1489
- @public
1490
- */
1491
- _emberTestingTestHelpers.registerHelper('currentPath', _emberTestingHelpersCurrent_path.default);
1510
+ router['initialURL'] = url;
1511
+ _emberMetalRun_loop.default(app, 'advanceReadiness');
1512
+ delete router['initialURL'];
1513
+ } else {
1514
+ shouldHandleURL = true;
1515
+ }
1492
1516
 
1493
- /**
1494
- Returns the current URL.
1495
-
1496
- Example:
1497
-
1498
- ```javascript
1499
- function validateURL() {
1500
- equal(currentURL(), '/some/path', "correct URL was transitioned into.");
1517
+ return app.testHelpers.wait();
1501
1518
  }
1502
-
1503
- click('#some-link-id').then(validateURL);
1504
- ```
1505
-
1506
- @method currentURL
1507
- @return {Object} The currently active URL.
1508
- @since 1.5.0
1509
- @public
1510
- */
1511
- _emberTestingTestHelpers.registerHelper('currentURL', _emberTestingHelpersCurrent_url.default);
1519
+ });
1520
+ 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) {
1521
+ 'use strict';
1512
1522
 
1513
- /**
1514
- Pauses the current test - this is useful for debugging while testing or for test-driving.
1515
- It allows you to inspect the state of your application at any point.
1516
-
1517
- Example (The test will pause before clicking the button):
1518
-
1519
- ```javascript
1520
- visit('/')
1521
- return pauseTest();
1522
-
1523
- click('.btn');
1524
- ```
1525
-
1526
- @since 1.9.0
1527
- @method pauseTest
1528
- @return {Object} A promise that will never resolve
1529
- @public
1530
- */
1531
- _emberTestingTestHelpers.registerAsyncHelper('pauseTest', _emberTestingHelpersPause_test.default);
1523
+ exports.default = wait;
1532
1524
 
1533
- /**
1534
- Triggers the given DOM event on the element identified by the provided selector.
1535
-
1536
- Example:
1537
-
1538
- ```javascript
1539
- triggerEvent('#some-elem-id', 'blur');
1540
- ```
1541
-
1542
- This is actually used internally by the `keyEvent` helper like so:
1543
-
1544
- ```javascript
1545
- triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 });
1546
- ```
1547
-
1548
- @method triggerEvent
1549
- @param {String} selector jQuery selector for finding element on the DOM
1550
- @param {String} [context] jQuery selector that will limit the selector
1551
- argument to find only within the context's children
1552
- @param {String} type The event type to be triggered.
1553
- @param {Object} [options] The options to be passed to jQuery.Event.
1554
- @return {RSVP.Promise}
1555
- @since 1.5.0
1556
- @public
1557
- */
1558
- _emberTestingTestHelpers.registerAsyncHelper('triggerEvent', _emberTestingHelpersTrigger_event.default);
1525
+ function wait(app, value) {
1526
+ return new _emberRuntimeExtRsvp.default.Promise(function (resolve) {
1527
+ var router = app.__container__.lookup('router:main');
1528
+
1529
+ // Every 10ms, poll for the async thing to have finished
1530
+ var watcher = setInterval(function () {
1531
+ // 1. If the router is loading, keep polling
1532
+ var routerIsLoading = router.router && !!router.router.activeTransition;
1533
+ if (routerIsLoading) {
1534
+ return;
1535
+ }
1536
+
1537
+ // 2. If there are pending Ajax requests, keep polling
1538
+ if (_emberTestingTestPending_requests.pendingRequests()) {
1539
+ return;
1540
+ }
1541
+
1542
+ // 3. If there are scheduled timers or we are inside of a run loop, keep polling
1543
+ if (_emberMetalRun_loop.default.hasScheduledTimers() || _emberMetalRun_loop.default.currentRunLoop) {
1544
+ return;
1545
+ }
1546
+
1547
+ if (_emberTestingTestWaiters.checkWaiters()) {
1548
+ return;
1549
+ }
1550
+
1551
+ // Stop polling
1552
+ clearInterval(watcher);
1553
+
1554
+ // Synchronously resolve the promise
1555
+ _emberMetalRun_loop.default(null, resolve, value);
1556
+ }, 10);
1557
+ });
1558
+ }
1559
1559
  });
1560
1560
  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) {
1561
1561
  'use strict';
@@ -1687,6 +1687,80 @@ enifed('ember-testing/support', ['exports', 'ember-metal/debug', 'ember-views/sy
1687
1687
  });
1688
1688
  }
1689
1689
  });
1690
+ 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) {
1691
+ /**
1692
+ @module ember
1693
+ @submodule ember-testing
1694
+ */
1695
+ 'use strict';
1696
+
1697
+ /**
1698
+ This is a container for an assortment of testing related functionality:
1699
+
1700
+ * Choose your default test adapter (for your framework of choice).
1701
+ * Register/Unregister additional test helpers.
1702
+ * Setup callbacks to be fired when the test helpers are injected into
1703
+ your application.
1704
+
1705
+ @class Test
1706
+ @namespace Ember
1707
+ @public
1708
+ */
1709
+ var Test = {
1710
+ /**
1711
+ Hash containing all known test helpers.
1712
+ @property _helpers
1713
+ @private
1714
+ @since 1.7.0
1715
+ */
1716
+ _helpers: _emberTestingTestHelpers.helpers,
1717
+
1718
+ registerHelper: _emberTestingTestHelpers.registerHelper,
1719
+ registerAsyncHelper: _emberTestingTestHelpers.registerAsyncHelper,
1720
+ unregisterHelper: _emberTestingTestHelpers.unregisterHelper,
1721
+ onInjectHelpers: _emberTestingTestOn_inject_helpers.onInjectHelpers,
1722
+ Promise: _emberTestingTestPromise.default,
1723
+ promise: _emberTestingTestPromise.promise,
1724
+ resolve: _emberTestingTestPromise.resolve,
1725
+ registerWaiter: _emberTestingTestWaiters.registerWaiter,
1726
+ unregisterWaiter: _emberTestingTestWaiters.unregisterWaiter
1727
+ };
1728
+
1729
+ if (false) {
1730
+ Test.checkWaiters = _emberTestingTestWaiters.checkWaiters;
1731
+ }
1732
+
1733
+ /**
1734
+ Used to allow ember-testing to communicate with a specific testing
1735
+ framework.
1736
+
1737
+ You can manually set it before calling `App.setupForTesting()`.
1738
+
1739
+ Example:
1740
+
1741
+ ```javascript
1742
+ Ember.Test.adapter = MyCustomAdapter.create()
1743
+ ```
1744
+
1745
+ If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.
1746
+
1747
+ @public
1748
+ @for Ember.Test
1749
+ @property adapter
1750
+ @type {Class} The adapter to be used.
1751
+ @default Ember.Test.QUnitAdapter
1752
+ */
1753
+ Object.defineProperty(Test, 'adapter', {
1754
+ get: _emberTestingTestAdapter.getAdapter,
1755
+ set: _emberTestingTestAdapter.setAdapter
1756
+ });
1757
+
1758
+ Object.defineProperty(Test, 'waiters', {
1759
+ get: _emberTestingTestWaiters.generateDeprecatedWaitersArray
1760
+ });
1761
+
1762
+ exports.default = Test;
1763
+ });
1690
1764
  enifed('ember-testing/test/adapter', ['exports', 'ember-console', 'ember-metal/error_handler'], function (exports, _emberConsole, _emberMetalError_handler) {
1691
1765
  'use strict';
1692
1766
 
@@ -2179,80 +2253,6 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal/features', 'ember-
2179
2253
  return array;
2180
2254
  }
2181
2255
  });
2182
- 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) {
2183
- /**
2184
- @module ember
2185
- @submodule ember-testing
2186
- */
2187
- 'use strict';
2188
-
2189
- /**
2190
- This is a container for an assortment of testing related functionality:
2191
-
2192
- * Choose your default test adapter (for your framework of choice).
2193
- * Register/Unregister additional test helpers.
2194
- * Setup callbacks to be fired when the test helpers are injected into
2195
- your application.
2196
-
2197
- @class Test
2198
- @namespace Ember
2199
- @public
2200
- */
2201
- var Test = {
2202
- /**
2203
- Hash containing all known test helpers.
2204
- @property _helpers
2205
- @private
2206
- @since 1.7.0
2207
- */
2208
- _helpers: _emberTestingTestHelpers.helpers,
2209
-
2210
- registerHelper: _emberTestingTestHelpers.registerHelper,
2211
- registerAsyncHelper: _emberTestingTestHelpers.registerAsyncHelper,
2212
- unregisterHelper: _emberTestingTestHelpers.unregisterHelper,
2213
- onInjectHelpers: _emberTestingTestOn_inject_helpers.onInjectHelpers,
2214
- Promise: _emberTestingTestPromise.default,
2215
- promise: _emberTestingTestPromise.promise,
2216
- resolve: _emberTestingTestPromise.resolve,
2217
- registerWaiter: _emberTestingTestWaiters.registerWaiter,
2218
- unregisterWaiter: _emberTestingTestWaiters.unregisterWaiter
2219
- };
2220
-
2221
- if (false) {
2222
- Test.checkWaiters = _emberTestingTestWaiters.checkWaiters;
2223
- }
2224
-
2225
- /**
2226
- Used to allow ember-testing to communicate with a specific testing
2227
- framework.
2228
-
2229
- You can manually set it before calling `App.setupForTesting()`.
2230
-
2231
- Example:
2232
-
2233
- ```javascript
2234
- Ember.Test.adapter = MyCustomAdapter.create()
2235
- ```
2236
-
2237
- If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.
2238
-
2239
- @public
2240
- @for Ember.Test
2241
- @property adapter
2242
- @type {Class} The adapter to be used.
2243
- @default Ember.Test.QUnitAdapter
2244
- */
2245
- Object.defineProperty(Test, 'adapter', {
2246
- get: _emberTestingTestAdapter.getAdapter,
2247
- set: _emberTestingTestAdapter.setAdapter
2248
- });
2249
-
2250
- Object.defineProperty(Test, 'waiters', {
2251
- get: _emberTestingTestWaiters.generateDeprecatedWaitersArray
2252
- });
2253
-
2254
- exports.default = Test;
2255
- });
2256
2256
  requireModule("ember-testing");
2257
2257
 
2258
2258
  }());