{"action":"created","comment":{"url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/comments/28204605","id":28204605,"diff_hunk":"@@ -72,9 +72,60 @@ class ViewBenchmarkGraphsTest < AcceptanceTest\n     assert_not page.has_content?(\"#{benchmark_run_category_humanize} memory Graph\")\n   end\n \n+  test \"User should be able to view long running benchmark graphs when they go back and forward \n+    in the broswer window\" do\n+\n+    javascript_driver = Capybara.javascript_driver\n+    default_driver = Capybara.current_driver\n+    Capybara.javascript_driver = :selenium\n+    Capybara.current_driver = :selenium\n+\n+    benchmark_run = benchmark_runs(:array_iterations_run2)\n+    benchmark_run2 = benchmark_runs(:array_count_run)\n+\n+    visit '/ruby/ruby/commits'\n+\n+    assert page.has_content?(\n+      I18n.t('repos.show.title', repo_name: benchmark_run.initiator.repo.name.capitalize)\n+    )\n+    assert page.has_content?(I18n.t('repos.show.select_benchmark'))\n+\n+    within \"form\" do\n+      choose(benchmark_run.benchmark_type.category)\n+      choose(benchmark_run2.benchmark_type.category)\n+    end\n+\n+    benchmark_run_category_humanize = benchmark_run.benchmark_type.category.humanize\n+    benchmark_run2_category_humanize = benchmark_run2.benchmark_type.category.humanize\n+    \n+    assert page.has_css?(\".chart .highcharts-container\")\n+    assert page.has_content?(\"#{benchmark_run2_category_humanize} Graph\")\n+    assert_not page.has_content?(\"#{benchmark_run2_category_humanize} memory Graph\")\n+\n+    page.evaluate_script('window.history.back()')\n+    \n+    assert page.has_content?(\"#{benchmark_run_category_humanize} Graph\")\n+    assert page.has_content?(\"#{benchmark_run_category_humanize} memory Graph\")\n+    assert page.has_content?(\"#{benchmark_run_category_humanize} Script\")\n+    \n+","path":"test/acceptance/view_benchmark_graphs_test.rb","position":40,"original_position":40,"commit_id":"c3802968fbb8b3575853c970b1a34d69b5d1273a","original_commit_id":"c3802968fbb8b3575853c970b1a34d69b5d1273a","user":{"login":"tgxworld","id":4335742,"avatar_url":"https://avatars.githubusercontent.com/u/4335742?v=3","gravatar_id":"","url":"https://api.github.com/users/tgxworld","html_url":"https://github.com/tgxworld","followers_url":"https://api.github.com/users/tgxworld/followers","following_url":"https://api.github.com/users/tgxworld/following{/other_user}","gists_url":"https://api.github.com/users/tgxworld/gists{/gist_id}","starred_url":"https://api.github.com/users/tgxworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgxworld/subscriptions","organizations_url":"https://api.github.com/users/tgxworld/orgs","repos_url":"https://api.github.com/users/tgxworld/repos","events_url":"https://api.github.com/users/tgxworld/events{/privacy}","received_events_url":"https://api.github.com/users/tgxworld/received_events","type":"User","site_admin":false},"body":"yea just one blank line will do :) I generally separate `assertions` from `actions` with one blank line. Helps with transitioning when trying to understand what the code is doing with each block. Haha I really should do up a style guide xD\r\n ","created_at":"2015-04-12T15:54:21Z","updated_at":"2015-04-12T15:54:21Z","html_url":"https://github.com/ruby-bench/ruby-bench-web/pull/39#discussion_r28204605","pull_request_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/comments/28204605"},"html":{"href":"https://github.com/ruby-bench/ruby-bench-web/pull/39#discussion_r28204605"},"pull_request":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39","id":31310471,"html_url":"https://github.com/ruby-bench/ruby-bench-web/pull/39","diff_url":"https://github.com/ruby-bench/ruby-bench-web/pull/39.diff","patch_url":"https://github.com/ruby-bench/ruby-bench-web/pull/39.patch","issue_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/39","number":39,"state":"open","locked":false,"title":"fix back and forward reloading of graphs by storing relevant data into h...","user":{"login":"tohyongcheng","id":2155919,"avatar_url":"https://avatars.githubusercontent.com/u/2155919?v=3","gravatar_id":"","url":"https://api.github.com/users/tohyongcheng","html_url":"https://github.com/tohyongcheng","followers_url":"https://api.github.com/users/tohyongcheng/followers","following_url":"https://api.github.com/users/tohyongcheng/following{/other_user}","gists_url":"https://api.github.com/users/tohyongcheng/gists{/gist_id}","starred_url":"https://api.github.com/users/tohyongcheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tohyongcheng/subscriptions","organizations_url":"https://api.github.com/users/tohyongcheng/orgs","repos_url":"https://api.github.com/users/tohyongcheng/repos","events_url":"https://api.github.com/users/tohyongcheng/events{/privacy}","received_events_url":"https://api.github.com/users/tohyongcheng/received_events","type":"User","site_admin":false},"body":"@tgxworld This fixes #39 . \r\n\r\nSo I tried different methods of figuring out the problems, thinking it was about jQuery not loading the cache properly, then realising that the previous code used the HTML5 history state. So, I reused the history state, to reload the relevant data (which is stored for each push) whenever the user clicks forward or back. Works in local, but will need to test it in staging.\r\n","created_at":"2015-03-17T06:31:33Z","updated_at":"2015-04-12T15:54:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d98441866e5cb20c51da3b177300dd38492dcf03","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39/commits","review_comments_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39/comments","review_comment_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/39/comments","statuses_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/statuses/c3802968fbb8b3575853c970b1a34d69b5d1273a","head":{"label":"tohyongcheng:master","ref":"master","sha":"c3802968fbb8b3575853c970b1a34d69b5d1273a","user":{"login":"tohyongcheng","id":2155919,"avatar_url":"https://avatars.githubusercontent.com/u/2155919?v=3","gravatar_id":"","url":"https://api.github.com/users/tohyongcheng","html_url":"https://github.com/tohyongcheng","followers_url":"https://api.github.com/users/tohyongcheng/followers","following_url":"https://api.github.com/users/tohyongcheng/following{/other_user}","gists_url":"https://api.github.com/users/tohyongcheng/gists{/gist_id}","starred_url":"https://api.github.com/users/tohyongcheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tohyongcheng/subscriptions","organizations_url":"https://api.github.com/users/tohyongcheng/orgs","repos_url":"https://api.github.com/users/tohyongcheng/repos","events_url":"https://api.github.com/users/tohyongcheng/events{/privacy}","received_events_url":"https://api.github.com/users/tohyongcheng/received_events","type":"User","site_admin":false},"repo":{"id":32299997,"name":"ruby-bench-web","full_name":"tohyongcheng/ruby-bench-web","owner":{"login":"tohyongcheng","id":2155919,"avatar_url":"https://avatars.githubusercontent.com/u/2155919?v=3","gravatar_id":"","url":"https://api.github.com/users/tohyongcheng","html_url":"https://github.com/tohyongcheng","followers_url":"https://api.github.com/users/tohyongcheng/followers","following_url":"https://api.github.com/users/tohyongcheng/following{/other_user}","gists_url":"https://api.github.com/users/tohyongcheng/gists{/gist_id}","starred_url":"https://api.github.com/users/tohyongcheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tohyongcheng/subscriptions","organizations_url":"https://api.github.com/users/tohyongcheng/orgs","repos_url":"https://api.github.com/users/tohyongcheng/repos","events_url":"https://api.github.com/users/tohyongcheng/events{/privacy}","received_events_url":"https://api.github.com/users/tohyongcheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tohyongcheng/ruby-bench-web","description":"Long Running Ruby Benchmarks","fork":true,"url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web","forks_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/forks","keys_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/teams","hooks_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/hooks","issue_events_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/issues/events{/number}","events_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/events","assignees_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/assignees{/user}","branches_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/branches{/branch}","tags_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/tags","blobs_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/statuses/{sha}","languages_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/languages","stargazers_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/stargazers","contributors_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/contributors","subscribers_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/subscribers","subscription_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/subscription","commits_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/contents/{+path}","compare_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/merges","archive_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/downloads","issues_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/issues{/number}","pulls_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/pulls{/number}","milestones_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/milestones{/number}","notifications_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/labels{/name}","releases_url":"https://api.github.com/repos/tohyongcheng/ruby-bench-web/releases{/id}","created_at":"2015-03-16T03:50:22Z","updated_at":"2015-04-10T09:31:51Z","pushed_at":"2015-04-10T09:31:51Z","git_url":"git://github.com/tohyongcheng/ruby-bench-web.git","ssh_url":"git@github.com:tohyongcheng/ruby-bench-web.git","clone_url":"https://github.com/tohyongcheng/ruby-bench-web.git","svn_url":"https://github.com/tohyongcheng/ruby-bench-web","homepage":"http://rubybench.org","size":3846,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ruby-bench:master","ref":"master","sha":"32c5fe13849e46701b1287608432c50ed41ef997","user":{"login":"ruby-bench","id":6201139,"avatar_url":"https://avatars.githubusercontent.com/u/6201139?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-bench","html_url":"https://github.com/ruby-bench","followers_url":"https://api.github.com/users/ruby-bench/followers","following_url":"https://api.github.com/users/ruby-bench/following{/other_user}","gists_url":"https://api.github.com/users/ruby-bench/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-bench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-bench/subscriptions","organizations_url":"https://api.github.com/users/ruby-bench/orgs","repos_url":"https://api.github.com/users/ruby-bench/repos","events_url":"https://api.github.com/users/ruby-bench/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-bench/received_events","type":"Organization","site_admin":false},"repo":{"id":26815515,"name":"ruby-bench-web","full_name":"ruby-bench/ruby-bench-web","owner":{"login":"ruby-bench","id":6201139,"avatar_url":"https://avatars.githubusercontent.com/u/6201139?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-bench","html_url":"https://github.com/ruby-bench","followers_url":"https://api.github.com/users/ruby-bench/followers","following_url":"https://api.github.com/users/ruby-bench/following{/other_user}","gists_url":"https://api.github.com/users/ruby-bench/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-bench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-bench/subscriptions","organizations_url":"https://api.github.com/users/ruby-bench/orgs","repos_url":"https://api.github.com/users/ruby-bench/repos","events_url":"https://api.github.com/users/ruby-bench/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-bench/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ruby-bench/ruby-bench-web","description":"Long Running Ruby Benchmarks","fork":false,"url":"https://api.github.com/repos/ruby-bench/ruby-bench-web","forks_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/forks","keys_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/teams","hooks_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/hooks","issue_events_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/events{/number}","events_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/events","assignees_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/assignees{/user}","branches_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/branches{/branch}","tags_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/tags","blobs_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/statuses/{sha}","languages_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/languages","stargazers_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/stargazers","contributors_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/contributors","subscribers_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/subscribers","subscription_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/subscription","commits_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/contents/{+path}","compare_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/merges","archive_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/downloads","issues_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues{/number}","pulls_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls{/number}","milestones_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/milestones{/number}","notifications_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/labels{/name}","releases_url":"https://api.github.com/repos/ruby-bench/ruby-bench-web/releases{/id}","created_at":"2014-11-18T15:27:41Z","updated_at":"2015-04-12T11:36:45Z","pushed_at":"2015-04-12T06:24:09Z","git_url":"git://github.com/ruby-bench/ruby-bench-web.git","ssh_url":"git@github.com:ruby-bench/ruby-bench-web.git","clone_url":"https://github.com/ruby-bench/ruby-bench-web.git","svn_url":"https://github.com/ruby-bench/ruby-bench-web","homepage":"http://rubybench.org","size":9110,"stargazers_count":33,"watchers_count":33,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":10,"forks":11,"open_issues":10,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39"},"html":{"href":"https://github.com/ruby-bench/ruby-bench-web/pull/39"},"issue":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/39"},"comments":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/ruby-bench/ruby-bench-web/statuses/c3802968fbb8b3575853c970b1a34d69b5d1273a"}}}}