{"action":"closed","issue":{"url":"https://api.github.com/repos/thefrontside/emberx-select/issues/118","repository_url":"https://api.github.com/repos/thefrontside/emberx-select","labels_url":"https://api.github.com/repos/thefrontside/emberx-select/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/thefrontside/emberx-select/issues/118/comments","events_url":"https://api.github.com/repos/thefrontside/emberx-select/issues/118/events","html_url":"https://github.com/thefrontside/emberx-select/issues/118","id":154294281,"number":118,"title":"Export `select` function for use in integration tests","user":{"login":"Robdel12","id":2072894,"avatar_url":"https://avatars.githubusercontent.com/u/2072894?v=3","gravatar_id":"","url":"https://api.github.com/users/Robdel12","html_url":"https://github.com/Robdel12","followers_url":"https://api.github.com/users/Robdel12/followers","following_url":"https://api.github.com/users/Robdel12/following{/other_user}","gists_url":"https://api.github.com/users/Robdel12/gists{/gist_id}","starred_url":"https://api.github.com/users/Robdel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robdel12/subscriptions","organizations_url":"https://api.github.com/users/Robdel12/orgs","repos_url":"https://api.github.com/users/Robdel12/repos","events_url":"https://api.github.com/users/Robdel12/events{/privacy}","received_events_url":"https://api.github.com/users/Robdel12/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thefrontside/emberx-select/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/thefrontside/emberx-select/milestones/3","html_url":"https://github.com/thefrontside/emberx-select/milestones/v3.0.0","labels_url":"https://api.github.com/repos/thefrontside/emberx-select/milestones/3/labels","id":1845793,"number":3,"title":"v3.0.0","description":"","creator":{"login":"Robdel12","id":2072894,"avatar_url":"https://avatars.githubusercontent.com/u/2072894?v=3","gravatar_id":"","url":"https://api.github.com/users/Robdel12","html_url":"https://github.com/Robdel12","followers_url":"https://api.github.com/users/Robdel12/followers","following_url":"https://api.github.com/users/Robdel12/following{/other_user}","gists_url":"https://api.github.com/users/Robdel12/gists{/gist_id}","starred_url":"https://api.github.com/users/Robdel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Robdel12/subscriptions","organizations_url":"https://api.github.com/users/Robdel12/orgs","repos_url":"https://api.github.com/users/Robdel12/repos","events_url":"https://api.github.com/users/Robdel12/events{/privacy}","received_events_url":"https://api.github.com/users/Robdel12/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":7,"state":"open","created_at":"2016-06-23T16:43:18Z","updated_at":"2016-09-04T00:29:35Z","due_on":"2016-07-30T05:00:00Z","closed_at":null},"comments":0,"created_at":"2016-05-11T17:05:39Z","updated_at":"2016-09-04T00:29:35Z","closed_at":"2016-09-04T00:29:35Z","body":"It would be really nice if we could refactor the select test helper to a function that's exported and can be imported to integration tests. Something like: \r\n\r\n```js\r\nimport Ember from 'ember';\r\n\r\nexport function select(selector, ...texts) {\r\n  let $options = Ember.$(`${selector} option`);\r\n\r\n  $options.each(function() {\r\n    let $option = Ember.$(this);\r\n\r\n    Ember.run(() => {\r\n      this.selected = texts.some(text => $option.is(`:contains('${text}')`));\r\n\r\n      if(this.selected) {\r\n        $option.prop('selected', true).trigger('change');\r\n      }\r\n\r\n    });\r\n  });\r\n}\r\n\r\nexport default function() {\r\n  Ember.Test.registerAsyncHelper('select', function(app, selector, texts) {\r\n    // let $options = app.testHelpers.findWithAssert(`${selector} option`); how to keep this?\r\n\r\n    select(selector, texts);\r\n\r\n    return app.testHelpers.wait();\r\n  });\r\n}\r\n```\r\n\r\nThere are still things to figure out but it would be really nice to have this helper. "}}
{"actor":{"display_login":"Robdel12"}}