{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/5001","labels_url":"https://api.github.com/repos/elastic/kibana/issues/5001/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/5001/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/5001/events","html_url":"https://github.com/elastic/kibana/issues/5001","id":107793866,"number":5001,"title":"Test selection attribute","user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/kibana/labels/discuss","name":"discuss","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-22T20:23:05Z","updated_at":"2015-09-22T21:03:38Z","closed_at":null,"body":"We need to choose a way to support selecting elements from with tests. Currently we do this with a combination of CSS selectors and id's, but those have well established issues. In order to circuvent those\r\nissues @epixa suggested we use data attributes ([see](http://roytomeij.com/blog/2012/dont-use-class-names-to-find-HTML-elements-with-JS.html)) to select the elements.\r\n\r\n@Bargs suggested we stick with the `data-*` prefix but pick a name that obviously maps the attribute to it's intended purpose: providing selectors for tests.\r\n\r\nThoughts? Please extend the lists below or comment and a contributor will add your suggestion to the list.\r\n\r\nGoals of the selector:\r\n - portray \"test selectors\" to keep it decoupled from all other uses\r\n - supports multiple values (space separated like `class`)\r\n - values are not globally unique\r\n\r\nOptions:\r\n - `data-tselect`\r\n - `data-testselect`\r\n - `data-purpose`\r\n - `purpose`\r\n - `data-test-roles`\r\n - `data-test-subject`"},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/142421143","html_url":"https://github.com/elastic/kibana/issues/5001#issuecomment-142421143","issue_url":"https://api.github.com/repos/elastic/kibana/issues/5001","id":142421143,"user":{"login":"simianhacker","id":41702,"avatar_url":"https://avatars.githubusercontent.com/u/41702?v=3","gravatar_id":"","url":"https://api.github.com/users/simianhacker","html_url":"https://github.com/simianhacker","followers_url":"https://api.github.com/users/simianhacker/followers","following_url":"https://api.github.com/users/simianhacker/following{/other_user}","gists_url":"https://api.github.com/users/simianhacker/gists{/gist_id}","starred_url":"https://api.github.com/users/simianhacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simianhacker/subscriptions","organizations_url":"https://api.github.com/users/simianhacker/orgs","repos_url":"https://api.github.com/users/simianhacker/repos","events_url":"https://api.github.com/users/simianhacker/events{/privacy}","received_events_url":"https://api.github.com/users/simianhacker/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T21:03:38Z","updated_at":"2015-09-22T21:03:38Z","body":"+1 on data-test-subject"}}