{"action":"created","issue":{"url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/49","repository_url":"https://api.github.com/repos/tetranz/select2entity-bundle","labels_url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/49/comments","events_url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/49/events","html_url":"https://github.com/tetranz/select2entity-bundle/issues/49","id":181625653,"number":49,"title":"Not working with functional tests","user":{"login":"binarious","id":200375,"avatar_url":"https://avatars0.githubusercontent.com/u/200375?v=3","gravatar_id":"","url":"https://api.github.com/users/binarious","html_url":"https://github.com/binarious","followers_url":"https://api.github.com/users/binarious/followers","following_url":"https://api.github.com/users/binarious/following{/other_user}","gists_url":"https://api.github.com/users/binarious/gists{/gist_id}","starred_url":"https://api.github.com/users/binarious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarious/subscriptions","organizations_url":"https://api.github.com/users/binarious/orgs","repos_url":"https://api.github.com/users/binarious/repos","events_url":"https://api.github.com/users/binarious/events{/privacy}","received_events_url":"https://api.github.com/users/binarious/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-07T09:41:44Z","updated_at":"2017-05-17T12:43:56Z","closed_at":null,"body":"I'd like to run functional tests and submit a form with this field, but I get the following error:\n\n```\nInvalidArgumentException: Input \"my_select2_field\" cannot take \"1\" as a value (possible values: ).\n```\n\nAny ideas?\n"},"comment":{"url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/comments/302078303","html_url":"https://github.com/tetranz/select2entity-bundle/issues/49#issuecomment-302078303","issue_url":"https://api.github.com/repos/tetranz/select2entity-bundle/issues/49","id":302078303,"user":{"login":"tetranz","id":2892757,"avatar_url":"https://avatars2.githubusercontent.com/u/2892757?v=3","gravatar_id":"","url":"https://api.github.com/users/tetranz","html_url":"https://github.com/tetranz","followers_url":"https://api.github.com/users/tetranz/followers","following_url":"https://api.github.com/users/tetranz/following{/other_user}","gists_url":"https://api.github.com/users/tetranz/gists{/gist_id}","starred_url":"https://api.github.com/users/tetranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tetranz/subscriptions","organizations_url":"https://api.github.com/users/tetranz/orgs","repos_url":"https://api.github.com/users/tetranz/repos","events_url":"https://api.github.com/users/tetranz/events{/privacy}","received_events_url":"https://api.github.com/users/tetranz/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T12:43:56Z","updated_at":"2017-05-17T12:43:56Z","body":"Yes, you're correct, of course, about checking the environment. I haven't done much with environments.\r\n\r\nWe've been talking about `remote_route` but, now that I think more about it, that's not really relevant. The `transform` method of the transformer needs to do something different in the test environment.\r\n\r\nWe already have the ability to use a custom transformer so it would be very easy to supply a \"test\" transformer which returns some test data from its `transform` method. That would cause `<option>` tags to be rendered and therefore the test would pass if the crawler POSTed one of the test values. Do we need anything more? I guess we could have a `test_transformer` config setting that only gets used in the test environment or, more generally, have some sort of `environment` setting related to the `transformer` setting we have now.\r\n\r\nI still feel that the goal is kind of wrong here. This will make the test \"pass\" but it's not really useful because the crawler sees this as a standard `<select>` tag. We're just avoiding an ugly but mostly meaningless test failure.\r\n\r\nI think this whole issue is related more to the fact that we don't have a graceful fallback for a request that doesn't support JavaScript. I guess that's more of a select2 thing."}}
{"actor":{"display_login":"tetranz"}}