{"action":"created","issue":{"url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/75","repository_url":"https://api.github.com/repos/switchfly/ember-test-helpers","labels_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/75/comments","events_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/75/events","html_url":"https://github.com/switchfly/ember-test-helpers/issues/75","id":93535934,"number":75,"title":"can't test customEvents","user":{"login":"amk221","id":382061,"avatar_url":"https://avatars.githubusercontent.com/u/382061?v=3","gravatar_id":"","url":"https://api.github.com/users/amk221","html_url":"https://github.com/amk221","followers_url":"https://api.github.com/users/amk221/followers","following_url":"https://api.github.com/users/amk221/following{/other_user}","gists_url":"https://api.github.com/users/amk221/gists{/gist_id}","starred_url":"https://api.github.com/users/amk221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amk221/subscriptions","organizations_url":"https://api.github.com/users/amk221/orgs","repos_url":"https://api.github.com/users/amk221/repos","events_url":"https://api.github.com/users/amk221/events{/privacy}","received_events_url":"https://api.github.com/users/amk221/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-07T13:56:13Z","updated_at":"2016-05-26T21:51:56Z","closed_at":null,"body":"We have these on our Application:\r\n\r\n    customEvents: {\r\n        webkitAnimationEnd: 'animationEnd'\r\n        msAnimationEnd: 'animationEnd'\r\n        oAnimationEnd: 'animationEnd'\r\n        animationend: 'animationEnd'\r\n    }\r\n\r\n...and in a component integration test:\r\n\r\n    this.render('{{foo-bar}}')\r\n    this.$().trigger('click') // works\r\n    this.$().trigger('animationEnd') // doesn't work\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/comments/222005685","html_url":"https://github.com/switchfly/ember-test-helpers/issues/75#issuecomment-222005685","issue_url":"https://api.github.com/repos/switchfly/ember-test-helpers/issues/75","id":222005685,"user":{"login":"mitchlloyd","id":15169,"avatar_url":"https://avatars.githubusercontent.com/u/15169?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchlloyd","html_url":"https://github.com/mitchlloyd","followers_url":"https://api.github.com/users/mitchlloyd/followers","following_url":"https://api.github.com/users/mitchlloyd/following{/other_user}","gists_url":"https://api.github.com/users/mitchlloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchlloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchlloyd/subscriptions","organizations_url":"https://api.github.com/users/mitchlloyd/orgs","repos_url":"https://api.github.com/users/mitchlloyd/repos","events_url":"https://api.github.com/users/mitchlloyd/events{/privacy}","received_events_url":"https://api.github.com/users/mitchlloyd/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T21:51:56Z","updated_at":"2016-05-26T21:51:56Z","body":"Got some help from @rwjblue on this one today and wanted to share here:\r\n\r\nIt seems that a nicer (but currently undocumented solution) is to `extend` the `EventDispatcher`:\r\n\r\n```js\r\n// inside of app/event_dispatcher.js\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.EventDispatcher.extend({\r\n  init() {\r\n    this._super(...arguments);\r\n    this.events.webkitAnimationEnd = 'animationEnd'\r\n  }\r\n});\r\n```\r\n\r\nThis works and feels like a better solution since setting up custom events is unlikely to change based on the current environment. \r\n\r\nThe `_` in the file name is surprising but currently needed. Also there could be a more intentional hook to let users edit the events."}}
{"actor":{"display_login":"mitchlloyd"}}