Skip to content

Instantly share code, notes, and snippets.

@alexlafroscia
Last active July 29, 2016 21:32
Show Gist options
  • Save alexlafroscia/f03083ff45820e6439dfe2a74ece920c to your computer and use it in GitHub Desktop.
Save alexlafroscia/f03083ff45820e6439dfe2a74ece920c to your computer and use it in GitHub Desktop.
Verify jQuery Trigger Bug in 2.8.0
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['my-component'],
foo: 'not clicked',
click() {
this.set('foo', 'clicked');
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Resolver from '../../resolver';
import config from '../../config/environment';
const resolver = Resolver.create();
resolver.namespace = {
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix
};
export default resolver;
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('my-component', 'TODO: put something here', {
integration: true
});
test('it renders', function(assert) {
this.render(hbs`{{my-component}}`);
assert.equal(this.$().text().trim(), 'not clicked');
this.$('.my-component').click();
assert.equal(this.$().text().trim(), 'clicked');
});
import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
setResolver(resolver);
{
"version": "0.10.3",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": true
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "beta",
"ember-data": "beta",
"ember-template-compiler": "beta"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment