{"action":"created","issue":{"url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/128","repository_url":"https://api.github.com/repos/kentcdodds/dom-testing-library","labels_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/128/comments","events_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/128/events","html_url":"https://github.com/kentcdodds/dom-testing-library/issues/128","id":370142154,"node_id":"MDU6SXNzdWUzNzAxNDIxNTQ=","number":128,"title":"Make data-testid attribute configurable.","user":{"login":"BenjaminEckardt","id":14793495,"node_id":"MDQ6VXNlcjE0NzkzNDk1","avatar_url":"https://avatars3.githubusercontent.com/u/14793495?v=4","gravatar_id":"","url":"https://api.github.com/users/BenjaminEckardt","html_url":"https://github.com/BenjaminEckardt","followers_url":"https://api.github.com/users/BenjaminEckardt/followers","following_url":"https://api.github.com/users/BenjaminEckardt/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminEckardt/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminEckardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminEckardt/subscriptions","organizations_url":"https://api.github.com/users/BenjaminEckardt/orgs","repos_url":"https://api.github.com/users/BenjaminEckardt/repos","events_url":"https://api.github.com/users/BenjaminEckardt/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminEckardt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T12:35:31Z","updated_at":"2018-10-15T13:08:17Z","closed_at":null,"author_association":"NONE","body":"First of all, thanks a lot for this library. I really like the approach of using the information the user actually perceives to select elements that are about to be tested.\r\n\r\nThe only feature that seems to differ from that approach is the `data-testid`. Although I also like this feature, I have a request for improvement.\r\n\r\n### Describe the feature you'd like:\r\nCurrently the `data-testid` attribute is hard coded.\r\n\r\nhttps://github.com/kentcdodds/dom-testing-library/blob/master/src/queries.js#L153\r\n\r\nI would like to have a possibility to pass the attribute as a configuration.\r\nThe benefit I see is that you can decouple the used attribute from the used testing library. This reduces the locking to this specific library. Besides that it also gives you the possibility of using this library also for existing UIs that rely on a different attribute for the same purpose.\r\n\r\nSince it's just a change of the selector I don't see any conflict with the philosophy of this library.\r\n\r\n### Describe alternatives you've considered:\r\nAlternative would be applying changes to all existing UIs whenever I change the testing library. Although this might often be achievable within an manageable amount of time, I would like to avoid these kind of unnecessary changes."},"comment":{"url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/comments/429846122","html_url":"https://github.com/kentcdodds/dom-testing-library/issues/128#issuecomment-429846122","issue_url":"https://api.github.com/repos/kentcdodds/dom-testing-library/issues/128","id":429846122,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTg0NjEyMg==","user":{"login":"gnapse","id":15199,"node_id":"MDQ6VXNlcjE1MTk5","avatar_url":"https://avatars0.githubusercontent.com/u/15199?v=4","gravatar_id":"","url":"https://api.github.com/users/gnapse","html_url":"https://github.com/gnapse","followers_url":"https://api.github.com/users/gnapse/followers","following_url":"https://api.github.com/users/gnapse/following{/other_user}","gists_url":"https://api.github.com/users/gnapse/gists{/gist_id}","starred_url":"https://api.github.com/users/gnapse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnapse/subscriptions","organizations_url":"https://api.github.com/users/gnapse/orgs","repos_url":"https://api.github.com/users/gnapse/repos","events_url":"https://api.github.com/users/gnapse/events{/privacy}","received_events_url":"https://api.github.com/users/gnapse/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T13:08:17Z","updated_at":"2018-10-15T13:08:17Z","author_association":"CONTRIBUTOR","body":"This seems to be a duplicate of #76, where you can see some suggestions about how to deal with this without requiring chanting the library."}}
{"actor":{"display_login":"gnapse"}}