{"action":"opened","issue":{"url":"https://api.github.com/repos/google/EarlGrey/issues/285","repository_url":"https://api.github.com/repos/google/EarlGrey","labels_url":"https://api.github.com/repos/google/EarlGrey/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/google/EarlGrey/issues/285/comments","events_url":"https://api.github.com/repos/google/EarlGrey/issues/285/events","html_url":"https://github.com/google/EarlGrey/issues/285","id":177960139,"number":285,"title":"How to extension GREYMatchers?","user":{"login":"jeff77731","id":4278332,"avatar_url":"https://avatars.githubusercontent.com/u/4278332?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff77731","html_url":"https://github.com/jeff77731","followers_url":"https://api.github.com/users/jeff77731/followers","following_url":"https://api.github.com/users/jeff77731/following{/other_user}","gists_url":"https://api.github.com/users/jeff77731/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff77731/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff77731/subscriptions","organizations_url":"https://api.github.com/users/jeff77731/orgs","repos_url":"https://api.github.com/users/jeff77731/repos","events_url":"https://api.github.com/users/jeff77731/events{/privacy}","received_events_url":"https://api.github.com/users/jeff77731/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-20T04:17:43Z","updated_at":"2016-09-20T04:17:43Z","closed_at":null,"body":"I want to extension GREYMatchers for customize my own matcher\r\n\r\n\textension GREYMatchers {\r\n\r\n\t\tpublic func grey_btnEnable(enable: Bool) -> GREYMatcher! {\r\n\t\t\tlet matches: MatchesBlock = { (element: AnyObject!) -> Bool in\r\n\t\t\t\treturn (element as? UIButton)!.enabled == enable\r\n\t\t\t}\r\n\r\n\t\t\tlet describe: DescribeToBlock = { (description: GREYDescription!) -> Void in\r\n\t\t\t\tdescription.appendText(\"test\")\r\n\t\t\t}\r\n\r\n\t\t\treturn GREYElementMatcherBlock(matchesBlock: matches, descriptionBlock: describe)\r\n\t\t}\r\n\t}\r\n\r\nBut it not work, I cannot find the function when use\r\nEarlGrey().selectElementWithMatcher(grey_accessibilityID(\"test\")).assertWithMatcher(grey_btnEnable(false))\r\nWhat's wrong with it?"}}
{"actor":{"display_login":"jeff77731"}}