{"action":"created","issue":{"url":"https://api.github.com/repos/decidim/decidim/issues/2312","repository_url":"https://api.github.com/repos/decidim/decidim","labels_url":"https://api.github.com/repos/decidim/decidim/issues/2312/labels{/name}","comments_url":"https://api.github.com/repos/decidim/decidim/issues/2312/comments","events_url":"https://api.github.com/repos/decidim/decidim/issues/2312/events","html_url":"https://github.com/decidim/decidim/pull/2312","id":278415505,"number":2312,"title":"Fix flaky test","user":{"login":"mrcasals","id":491891,"avatar_url":"https://avatars3.githubusercontent.com/u/491891?v=4","gravatar_id":"","url":"https://api.github.com/users/mrcasals","html_url":"https://github.com/mrcasals","followers_url":"https://api.github.com/users/mrcasals/followers","following_url":"https://api.github.com/users/mrcasals/following{/other_user}","gists_url":"https://api.github.com/users/mrcasals/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcasals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcasals/subscriptions","organizations_url":"https://api.github.com/users/mrcasals/orgs","repos_url":"https://api.github.com/users/mrcasals/repos","events_url":"https://api.github.com/users/mrcasals/events{/privacy}","received_events_url":"https://api.github.com/users/mrcasals/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mrcasals","id":491891,"avatar_url":"https://avatars3.githubusercontent.com/u/491891?v=4","gravatar_id":"","url":"https://api.github.com/users/mrcasals","html_url":"https://github.com/mrcasals","followers_url":"https://api.github.com/users/mrcasals/followers","following_url":"https://api.github.com/users/mrcasals/following{/other_user}","gists_url":"https://api.github.com/users/mrcasals/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcasals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcasals/subscriptions","organizations_url":"https://api.github.com/users/mrcasals/orgs","repos_url":"https://api.github.com/users/mrcasals/repos","events_url":"https://api.github.com/users/mrcasals/events{/privacy}","received_events_url":"https://api.github.com/users/mrcasals/received_events","type":"User","site_admin":false},"assignees":[{"login":"mrcasals","id":491891,"avatar_url":"https://avatars3.githubusercontent.com/u/491891?v=4","gravatar_id":"","url":"https://api.github.com/users/mrcasals","html_url":"https://github.com/mrcasals","followers_url":"https://api.github.com/users/mrcasals/followers","following_url":"https://api.github.com/users/mrcasals/following{/other_user}","gists_url":"https://api.github.com/users/mrcasals/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcasals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcasals/subscriptions","organizations_url":"https://api.github.com/users/mrcasals/orgs","repos_url":"https://api.github.com/users/mrcasals/repos","events_url":"https://api.github.com/users/mrcasals/events{/privacy}","received_events_url":"https://api.github.com/users/mrcasals/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-12-01T10:04:14Z","updated_at":"2017-12-01T12:25:41Z","closed_at":"2017-12-01T11:07:02Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/decidim/decidim/pulls/2312","html_url":"https://github.com/decidim/decidim/pull/2312","diff_url":"https://github.com/decidim/decidim/pull/2312.diff","patch_url":"https://github.com/decidim/decidim/pull/2312.patch"},"body":"#### :tophat: What? Why?\r\nFollowing @deivid-rodriguez's series of flaky test fixes, I found another one:\r\n\r\nhttps://circleci.com/gh/decidim/decidim/29929\r\n\r\nThe expectation is sometimes run before the JS has finished. Using the `have_selector` check ensures the JS will have finished, AFAIK.\r\n\r\n#### :pushpin: Related Issues\r\nNone"},"comment":{"url":"https://api.github.com/repos/decidim/decidim/issues/comments/348482132","html_url":"https://github.com/decidim/decidim/pull/2312#issuecomment-348482132","issue_url":"https://api.github.com/repos/decidim/decidim/issues/2312","id":348482132,"user":{"login":"deivid-rodriguez","id":2887858,"avatar_url":"https://avatars2.githubusercontent.com/u/2887858?v=4","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"created_at":"2017-12-01T12:25:41Z","updated_at":"2017-12-01T12:25:41Z","author_association":"COLLABORATOR","body":"Let me quickly post here what I have learnt in those PR's. _Most_ of `capybara`'s mechanisms wait for content to appear for a certain time. The exceptions are esoteric things like `execute_script` or negative assertions such as `to_not have_content(text)` (if the text is not yet there, the expectation is valid and flow continues, to wait for content you need `to have_no_content(text)`.\r\n\r\nMost of my PR's focused on `find(selector)` which I thought didn't wait for content to appear. But I finally started suspecting that my PR's were not fixing anything, so I went check capybara's sources, and it indeed waits (that `synced_resolve`...)\r\n\r\nhttps://github.com/teamcapybara/capybara/blob/ec3cc1c6c2ae2fedf85f448989e3bd6313c5cf40/lib/capybara/node/finders.rb#L31-L37\r\n\r\nSo a lot of my PR's have been basically useless, but at least we've learnt something..."}}
{"actor":{"display_login":"deivid-rodriguez"}}