Skip to content

Commit

Permalink
[GLIMMER2] Unskip more tests (#13555)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadhietala authored and krisselden committed May 25, 2016
1 parent a3a72a7 commit ceb2b15
Show file tree
Hide file tree
Showing 17 changed files with 187 additions and 208 deletions.
3 changes: 1 addition & 2 deletions packages/ember-metal/tests/events_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
sendEvent,
hasListeners
} from 'ember-metal/events';
import { test } from 'ember-glimmer/tests/utils/skip-if-glimmer';

QUnit.module('system/props/events_test');

Expand Down Expand Up @@ -261,7 +260,7 @@ QUnit.test('a listener added as part of a mixin may be overridden', function() {
equal(triggered, 1, 'should invoke from subclass property');
});

test('DEPRECATED: adding didInitAttrs as a listener is deprecated', function() {
QUnit.test('DEPRECATED: adding didInitAttrs as a listener is deprecated', function() {
var obj = Component.create();

expectDeprecation(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { compile } from '../utils/helpers';

import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';
QUnit.module('ember-template-compiler: deprecate-model-render');

testModule('ember-template-compiler: deprecate-model-render');

test('Using `{{render` with model provides a deprecation', function() {
QUnit.test('Using `{{render` with model provides a deprecation', function() {
expect(1);

let expectedMessage =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { compile } from '../utils/helpers';

import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';
QUnit.module('ember-template-compiler: assert-no-view-and-controller-paths without legacy view support');

testModule('ember-template-compiler: assert-no-view-and-controller-paths without legacy view support');

test('Can transform an inline {{link-to}} without error', function() {
QUnit.test('Can transform an inline {{link-to}} without error', function() {
expect(0);

compile(`{{link-to 'foo' 'index'}}`, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { compile } from '../utils/helpers';

import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';
QUnit.module('ember-template-compiler: transform-input-on');

testModule('ember-template-compiler: transform-input-on');

test('Using `action` without `on` provides a deprecation', function() {
QUnit.test('Using `action` without `on` provides a deprecation', function() {
expect(1);

expectDeprecation(function() {
Expand All @@ -14,7 +12,7 @@ test('Using `action` without `on` provides a deprecation', function() {
}, `Using '{{input action="foo"}}' ('foo/bar/baz' @ L1:C0) is deprecated. Please use '{{input enter="foo"}}' instead.`);
});

test('Using `action` with `on` provides a deprecation', function() {
QUnit.test('Using `action` with `on` provides a deprecation', function() {
expect(1);

expectDeprecation(function() {
Expand All @@ -24,7 +22,7 @@ test('Using `action` with `on` provides a deprecation', function() {
}, `Using '{{input on="focus-in" action="foo"}}' ('foo/bar/baz' @ L1:C0) is deprecated. Please use '{{input focus-in="foo"}}' instead.`);
});

test('Using `on=\'keyPress\'` does not clobber `keyPress`', function() {
QUnit.test('Using `on=\'keyPress\'` does not clobber `keyPress`', function() {
expect(1);

expectDeprecation(function() {
Expand All @@ -34,7 +32,7 @@ test('Using `on=\'keyPress\'` does not clobber `keyPress`', function() {
}, `Using '{{input on="keyPress" action="foo"}}' ('foo/bar/baz' @ L1:C0) is deprecated. Please use '{{input key-press="foo"}}' instead.`);
});

test('Using `on=\'foo\'` without `action=\'asdf\'` raises specific deprecation', function() {
QUnit.test('Using `on=\'foo\'` without `action=\'asdf\'` raises specific deprecation', function() {
expect(1);

expectDeprecation(function() {
Expand Down
16 changes: 8 additions & 8 deletions packages/ember-templates/tests/bootstrap_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function checkTemplate(templateName) {
runDestroy(view);
}

import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';
import { test } from 'ember-glimmer/tests/utils/skip-if-glimmer';

testModule('ember-htmlbars: bootstrap', {
QUnit.module('ember-htmlbars: bootstrap', {
setup() {
context.lookup = lookup = {};
},
Expand Down Expand Up @@ -65,7 +65,7 @@ test('template without data-template-name or id should default to application',
});

if (typeof Handlebars === 'object') {
test('template with type text/x-raw-handlebars should be parsed', function() {
QUnit.test('template with type text/x-raw-handlebars should be parsed', function() {
jQuery('#qunit-fixture').html('<script type="text/x-raw-handlebars" data-template-name="funkyTemplate">{{name}}</script>');

run(function() {
Expand All @@ -81,7 +81,7 @@ if (typeof Handlebars === 'object') {
});
}

test('duplicated default application templates should throw exception', function() {
QUnit.test('duplicated default application templates should throw exception', function() {
jQuery('#qunit-fixture').html('<script type="text/x-handlebars">first</script><script type="text/x-handlebars">second</script>');

throws(function () {
Expand All @@ -91,7 +91,7 @@ test('duplicated default application templates should throw exception', function
'duplicate templates should not be allowed');
});

test('default application template and id application template present should throw exception', function() {
QUnit.test('default application template and id application template present should throw exception', function() {
jQuery('#qunit-fixture').html('<script type="text/x-handlebars">first</script><script type="text/x-handlebars" id="application">second</script>');

throws(function () {
Expand All @@ -101,7 +101,7 @@ test('default application template and id application template present should th
'duplicate templates should not be allowed');
});

test('default application template and data-template-name application template present should throw exception', function() {
QUnit.test('default application template and data-template-name application template present should throw exception', function() {
jQuery('#qunit-fixture').html('<script type="text/x-handlebars">first</script><script type="text/x-handlebars" data-template-name="application">second</script>');

throws(function () {
Expand All @@ -111,7 +111,7 @@ test('default application template and data-template-name application template p
'duplicate templates should not be allowed');
});

test('duplicated template id should throw exception', function() {
QUnit.test('duplicated template id should throw exception', function() {
jQuery('#qunit-fixture').html('<script type="text/x-handlebars" id="funkyTemplate">first</script><script type="text/x-handlebars" id="funkyTemplate">second</script>');

throws(function () {
Expand All @@ -121,7 +121,7 @@ test('duplicated template id should throw exception', function() {
'duplicate templates should not be allowed');
});

test('duplicated template data-template-name should throw exception', function() {
QUnit.test('duplicated template data-template-name should throw exception', function() {
jQuery('#qunit-fixture').html('<script type="text/x-handlebars" data-template-name="funkyTemplate">first</script><script type="text/x-handlebars" data-template-name="funkyTemplate">second</script>');

throws(function () {
Expand Down
24 changes: 12 additions & 12 deletions packages/ember-testing/tests/acceptance_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import RSVP from 'ember-runtime/ext/rsvp';

var App, find, click, fillIn, currentRoute, currentURL, visit, originalAdapter, andThen, indexHitCount;

import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';
import { test } from 'ember-glimmer/tests/utils/skip-if-glimmer';

testModule('ember-testing Acceptance', {
QUnit.module('ember-testing Acceptance', {
setup() {
jQuery('<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>').appendTo('head');
jQuery('<div id="ember-testing-container"><div id="ember-testing"></div></div>').appendTo('body');
Expand Down Expand Up @@ -257,7 +257,7 @@ test('Helpers nested in thens', function() {
});
});

test('Aborted transitions are not logged via Ember.Test.adapter#exception', function () {
QUnit.test('Aborted transitions are not logged via Ember.Test.adapter#exception', function () {
expect(0);

Test.adapter = QUnitAdapter.create({
Expand All @@ -269,7 +269,7 @@ test('Aborted transitions are not logged via Ember.Test.adapter#exception', func
visit('/abort_transition');
});

test('Unhandled exceptions are logged via Ember.Test.adapter#exception', function () {
QUnit.test('Unhandled exceptions are logged via Ember.Test.adapter#exception', function () {
expect(2);

var asyncHandled;
Expand All @@ -289,7 +289,7 @@ test('Unhandled exceptions are logged via Ember.Test.adapter#exception', functio
asyncHandled = click('.does-not-exist');
});

test('Unhandled exceptions in `andThen` are logged via Ember.Test.adapter#exception', function () {
QUnit.test('Unhandled exceptions in `andThen` are logged via Ember.Test.adapter#exception', function () {
expect(1);

Test.adapter = QUnitAdapter.create({
Expand All @@ -305,7 +305,7 @@ test('Unhandled exceptions in `andThen` are logged via Ember.Test.adapter#except
});
});

test('should not start routing on the root URL when visiting another', function() {
QUnit.test('should not start routing on the root URL when visiting another', function() {
expect(4);

visit('/posts');
Expand All @@ -318,7 +318,7 @@ test('should not start routing on the root URL when visiting another', function(
});
});

test('only enters the index route once when visiting /', function() {
QUnit.test('only enters the index route once when visiting /', function() {
expect(1);

visit('/');
Expand All @@ -328,7 +328,7 @@ test('only enters the index route once when visiting /', function() {
});
});

test('test must not finish while asyncHelpers are pending', function () {
QUnit.test('test must not finish while asyncHelpers are pending', function () {
expect(2);

var async = 0;
Expand Down Expand Up @@ -364,7 +364,7 @@ test('test must not finish while asyncHelpers are pending', function () {
}
});

test('visiting a URL that causes another transition should yield the correct URL', function () {
QUnit.test('visiting a URL that causes another transition should yield the correct URL', function () {
expect(1);

visit('/redirect');
Expand All @@ -374,7 +374,7 @@ test('visiting a URL that causes another transition should yield the correct URL
});
});

test('visiting a URL and then visiting a second URL with a transition should yield the correct URL', function () {
QUnit.test('visiting a URL and then visiting a second URL with a transition should yield the correct URL', function () {
expect(2);

visit('/posts');
Expand All @@ -390,9 +390,9 @@ test('visiting a URL and then visiting a second URL with a transition should yie
});
});

testModule('ember-testing Acceptance – teardown');
QUnit.module('ember-testing Acceptance – teardown');

test('that the setup/teardown happens correct', function() {
QUnit.test('that the setup/teardown happens correct', function() {
expect(2);

jQuery('<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>').appendTo('head');
Expand Down
25 changes: 12 additions & 13 deletions packages/ember-views/tests/system/event_dispatcher_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ var owner, view, originalViewKeyword;
var dispatcher;

import isEnabled from 'ember-metal/features';
import { test, testModule } from 'ember-glimmer/tests/utils/skip-if-glimmer';

testModule('EventDispatcher', {
QUnit.module('EventDispatcher', {
setup() {
originalViewKeyword = registerKeyword('view', viewKeyword);

Expand All @@ -49,7 +48,7 @@ testModule('EventDispatcher', {
});

if (isEnabled('ember-improved-instrumentation')) {
test('should instrument triggered events', function() {
QUnit.test('should instrument triggered events', function() {
let clicked = 0;

run(function () {
Expand Down Expand Up @@ -101,7 +100,7 @@ if (isEnabled('ember-improved-instrumentation')) {
});
}

test('should dispatch events to views', function() {
QUnit.test('should dispatch events to views', function() {
var receivedEvent;
var parentMouseDownCalled = 0;
var childKeyDownCalled = 0;
Expand Down Expand Up @@ -154,7 +153,7 @@ test('should dispatch events to views', function() {
equal(parentKeyDownCalled, 0, 'does not call keyDown on parent if child handles event');
});

test('should not dispatch events to views not inDOM', function() {
QUnit.test('should not dispatch events to views not inDOM', function() {
var receivedEvent;

view = View.extend({
Expand Down Expand Up @@ -190,7 +189,7 @@ test('should not dispatch events to views not inDOM', function() {
$element.remove();
});

test('should send change events up view hierarchy if view contains form elements', function() {
QUnit.test('should send change events up view hierarchy if view contains form elements', function() {
var receivedEvent;
view = View.create({
template: compile('<input id="is-done" type="checkbox">'),
Expand All @@ -209,7 +208,7 @@ test('should send change events up view hierarchy if view contains form elements
equal(receivedEvent.target, jQuery('#is-done')[0], 'target property is the element that was clicked');
});

test('events should stop propagating if the view is destroyed', function() {
QUnit.test('events should stop propagating if the view is destroyed', function() {
var parentComponentReceived, receivedEvent;

owner.register('component:x-foo', Component.extend({
Expand Down Expand Up @@ -239,7 +238,7 @@ test('events should stop propagating if the view is destroyed', function() {
ok(!parentComponentReceived, 'parent component does not receive the event');
});

test('should dispatch events to nearest event manager', function() {
QUnit.test('should dispatch events to nearest event manager', function() {
var receivedEvent = 0;
view = View.create({
template: compile('<input id="is-done" type="checkbox">'),
Expand All @@ -261,7 +260,7 @@ test('should dispatch events to nearest event manager', function() {
equal(receivedEvent, 1, 'event should go to manager and not view');
});

test('event manager should be able to re-dispatch events to view', function() {
QUnit.test('event manager should be able to re-dispatch events to view', function() {
var receivedEvent = 0;

owner.register('component:x-foo', Component.extend({
Expand Down Expand Up @@ -301,7 +300,7 @@ test('event manager should be able to re-dispatch events to view', function() {
equal(receivedEvent, 2, 'event should go to manager and not view');
});

test('event handlers should be wrapped in a run loop', function() {
QUnit.test('event handlers should be wrapped in a run loop', function() {
expect(1);

view = View.extend({
Expand Down Expand Up @@ -336,7 +335,7 @@ QUnit.module('EventDispatcher#setup', {
}
});

test('additional events which should be listened on can be passed', function () {
QUnit.test('additional events which should be listened on can be passed', function () {
expect(1);

run(function () {
Expand All @@ -353,7 +352,7 @@ test('additional events which should be listened on can be passed', function ()
jQuery('#leView').trigger('myevent');
});

test('additional events and rootElement can be specified', function () {
QUnit.test('additional events and rootElement can be specified', function () {
expect(3);

jQuery('#qunit-fixture').append('<div class=\'custom-root\'></div>');
Expand All @@ -375,7 +374,7 @@ test('additional events and rootElement can be specified', function () {
jQuery('#leView').trigger('myevent');
});

test('default events can be disabled via `customEvents`', function () {
QUnit.test('default events can be disabled via `customEvents`', function () {
expect(1);

run(function () {
Expand Down
Loading

0 comments on commit ceb2b15

Please sign in to comment.