{"action":"created","comment":{"url":"https://api.github.com/repos/popcodeorg/popcode/pulls/comments/77616726","id":77616726,"diff_hunk":"@@ -38,4 +43,26 @@ describe('projectActions', () => {\n       );\n     });\n   });\n+\n+  describe('changeCurrentProject', () => {\n+    let projectKey;\n+\n+    beforeEach(() => {\n+      store.dispatch(createProject());\n+      projectKey = getCurrentProject(store.getState()).projectKey;\n+      store.dispatch(toggleLibrary(projectKey, 'jquery'));\n+      store.dispatch(createProject());\n+      const secondProjectKey = getCurrentProject(store.getState()).projectKey;\n+      store.dispatch(toggleLibrary(secondProjectKey, 'jquery'));\n+      store.dispatch(changeCurrentProject(projectKey));","path":"spec/examples/actions/projects.spec.js","position":29,"original_position":29,"commit_id":"8202057ebb7a2a3c979b4834e620b01524301bdc","original_commit_id":"8202057ebb7a2a3c979b4834e620b01524301bdc","user":{"login":"outoftime","id":14214,"avatar_url":"https://avatars.githubusercontent.com/u/14214?v=3","gravatar_id":"","url":"https://api.github.com/users/outoftime","html_url":"https://github.com/outoftime","followers_url":"https://api.github.com/users/outoftime/followers","following_url":"https://api.github.com/users/outoftime/following{/other_user}","gists_url":"https://api.github.com/users/outoftime/gists{/gist_id}","starred_url":"https://api.github.com/users/outoftime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outoftime/subscriptions","organizations_url":"https://api.github.com/users/outoftime/orgs","repos_url":"https://api.github.com/users/outoftime/repos","events_url":"https://api.github.com/users/outoftime/events{/privacy}","received_events_url":"https://api.github.com/users/outoftime/received_events","type":"User","site_admin":false},"body":"@alexpelan what do you think of this sort of thing? Specifically, setting up a particular state for the store by firing off a bunch of actions to put it in that state? The main alternative on my mind would be directly specifying what the initial state should be (probably using an abstraction specifically built for tests)","created_at":"2016-09-06T11:25:02Z","updated_at":"2016-09-06T11:25:02Z","html_url":"https://github.com/popcodeorg/popcode/pull/162#discussion_r77616726","pull_request_url":"https://api.github.com/repos/popcodeorg/popcode/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/comments/77616726"},"html":{"href":"https://github.com/popcodeorg/popcode/pull/162#discussion_r77616726"},"pull_request":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/popcodeorg/popcode/pulls/162","id":84050317,"html_url":"https://github.com/popcodeorg/popcode/pull/162","diff_url":"https://github.com/popcodeorg/popcode/pull/162.diff","patch_url":"https://github.com/popcodeorg/popcode/pull/162.patch","issue_url":"https://api.github.com/repos/popcodeorg/popcode/issues/162","number":162,"state":"open","locked":false,"title":"Fix disappearing projects in list after switching projects","user":{"login":"outoftime","id":14214,"avatar_url":"https://avatars.githubusercontent.com/u/14214?v=3","gravatar_id":"","url":"https://api.github.com/users/outoftime","html_url":"https://github.com/outoftime","followers_url":"https://api.github.com/users/outoftime/followers","following_url":"https://api.github.com/users/outoftime/following{/other_user}","gists_url":"https://api.github.com/users/outoftime/gists{/gist_id}","starred_url":"https://api.github.com/users/outoftime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outoftime/subscriptions","organizations_url":"https://api.github.com/users/outoftime/orgs","repos_url":"https://api.github.com/users/outoftime/repos","events_url":"https://api.github.com/users/outoftime/events{/privacy}","received_events_url":"https://api.github.com/users/outoftime/received_events","type":"User","site_admin":false},"body":"Fixes bug where switching projects causes all other projects in the list to disappear. This is because I had reversed one of the conditions in the filter for which projects to retain after a project switch.","created_at":"2016-09-06T01:51:44Z","updated_at":"2016-09-06T11:25:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24015a1bda85169f2b30785f6a3dffc325383713","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/popcodeorg/popcode/pulls/162/commits","review_comments_url":"https://api.github.com/repos/popcodeorg/popcode/pulls/162/comments","review_comment_url":"https://api.github.com/repos/popcodeorg/popcode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/popcodeorg/popcode/issues/162/comments","statuses_url":"https://api.github.com/repos/popcodeorg/popcode/statuses/8202057ebb7a2a3c979b4834e620b01524301bdc","head":{"label":"outoftime:project-list-after-switch","ref":"project-list-after-switch","sha":"8202057ebb7a2a3c979b4834e620b01524301bdc","user":{"login":"outoftime","id":14214,"avatar_url":"https://avatars.githubusercontent.com/u/14214?v=3","gravatar_id":"","url":"https://api.github.com/users/outoftime","html_url":"https://github.com/outoftime","followers_url":"https://api.github.com/users/outoftime/followers","following_url":"https://api.github.com/users/outoftime/following{/other_user}","gists_url":"https://api.github.com/users/outoftime/gists{/gist_id}","starred_url":"https://api.github.com/users/outoftime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outoftime/subscriptions","organizations_url":"https://api.github.com/users/outoftime/orgs","repos_url":"https://api.github.com/users/outoftime/repos","events_url":"https://api.github.com/users/outoftime/events{/privacy}","received_events_url":"https://api.github.com/users/outoftime/received_events","type":"User","site_admin":false},"repo":{"id":52812901,"name":"popcode","full_name":"outoftime/popcode","owner":{"login":"outoftime","id":14214,"avatar_url":"https://avatars.githubusercontent.com/u/14214?v=3","gravatar_id":"","url":"https://api.github.com/users/outoftime","html_url":"https://github.com/outoftime","followers_url":"https://api.github.com/users/outoftime/followers","following_url":"https://api.github.com/users/outoftime/following{/other_user}","gists_url":"https://api.github.com/users/outoftime/gists{/gist_id}","starred_url":"https://api.github.com/users/outoftime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/outoftime/subscriptions","organizations_url":"https://api.github.com/users/outoftime/orgs","repos_url":"https://api.github.com/users/outoftime/repos","events_url":"https://api.github.com/users/outoftime/events{/privacy}","received_events_url":"https://api.github.com/users/outoftime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/outoftime/popcode","description":"An HTML/CSS/JavaScript editor for use in the classroom","fork":true,"url":"https://api.github.com/repos/outoftime/popcode","forks_url":"https://api.github.com/repos/outoftime/popcode/forks","keys_url":"https://api.github.com/repos/outoftime/popcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/outoftime/popcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/outoftime/popcode/teams","hooks_url":"https://api.github.com/repos/outoftime/popcode/hooks","issue_events_url":"https://api.github.com/repos/outoftime/popcode/issues/events{/number}","events_url":"https://api.github.com/repos/outoftime/popcode/events","assignees_url":"https://api.github.com/repos/outoftime/popcode/assignees{/user}","branches_url":"https://api.github.com/repos/outoftime/popcode/branches{/branch}","tags_url":"https://api.github.com/repos/outoftime/popcode/tags","blobs_url":"https://api.github.com/repos/outoftime/popcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/outoftime/popcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/outoftime/popcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/outoftime/popcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/outoftime/popcode/statuses/{sha}","languages_url":"https://api.github.com/repos/outoftime/popcode/languages","stargazers_url":"https://api.github.com/repos/outoftime/popcode/stargazers","contributors_url":"https://api.github.com/repos/outoftime/popcode/contributors","subscribers_url":"https://api.github.com/repos/outoftime/popcode/subscribers","subscription_url":"https://api.github.com/repos/outoftime/popcode/subscription","commits_url":"https://api.github.com/repos/outoftime/popcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/outoftime/popcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/outoftime/popcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/outoftime/popcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/outoftime/popcode/contents/{+path}","compare_url":"https://api.github.com/repos/outoftime/popcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/outoftime/popcode/merges","archive_url":"https://api.github.com/repos/outoftime/popcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/outoftime/popcode/downloads","issues_url":"https://api.github.com/repos/outoftime/popcode/issues{/number}","pulls_url":"https://api.github.com/repos/outoftime/popcode/pulls{/number}","milestones_url":"https://api.github.com/repos/outoftime/popcode/milestones{/number}","notifications_url":"https://api.github.com/repos/outoftime/popcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/outoftime/popcode/labels{/name}","releases_url":"https://api.github.com/repos/outoftime/popcode/releases{/id}","deployments_url":"https://api.github.com/repos/outoftime/popcode/deployments","created_at":"2016-02-29T18:19:12Z","updated_at":"2016-02-29T18:19:13Z","pushed_at":"2016-09-06T01:59:46Z","git_url":"git://github.com/outoftime/popcode.git","ssh_url":"git@github.com:outoftime/popcode.git","clone_url":"https://github.com/outoftime/popcode.git","svn_url":"https://github.com/outoftime/popcode","homepage":null,"size":800,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"popcodeorg:master","ref":"master","sha":"dfc6b6d01f3a49140fc52c40f00f4f71c63c5486","user":{"login":"popcodeorg","id":15622831,"avatar_url":"https://avatars.githubusercontent.com/u/15622831?v=3","gravatar_id":"","url":"https://api.github.com/users/popcodeorg","html_url":"https://github.com/popcodeorg","followers_url":"https://api.github.com/users/popcodeorg/followers","following_url":"https://api.github.com/users/popcodeorg/following{/other_user}","gists_url":"https://api.github.com/users/popcodeorg/gists{/gist_id}","starred_url":"https://api.github.com/users/popcodeorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popcodeorg/subscriptions","organizations_url":"https://api.github.com/users/popcodeorg/orgs","repos_url":"https://api.github.com/users/popcodeorg/repos","events_url":"https://api.github.com/users/popcodeorg/events{/privacy}","received_events_url":"https://api.github.com/users/popcodeorg/received_events","type":"Organization","site_admin":false},"repo":{"id":39417599,"name":"popcode","full_name":"popcodeorg/popcode","owner":{"login":"popcodeorg","id":15622831,"avatar_url":"https://avatars.githubusercontent.com/u/15622831?v=3","gravatar_id":"","url":"https://api.github.com/users/popcodeorg","html_url":"https://github.com/popcodeorg","followers_url":"https://api.github.com/users/popcodeorg/followers","following_url":"https://api.github.com/users/popcodeorg/following{/other_user}","gists_url":"https://api.github.com/users/popcodeorg/gists{/gist_id}","starred_url":"https://api.github.com/users/popcodeorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popcodeorg/subscriptions","organizations_url":"https://api.github.com/users/popcodeorg/orgs","repos_url":"https://api.github.com/users/popcodeorg/repos","events_url":"https://api.github.com/users/popcodeorg/events{/privacy}","received_events_url":"https://api.github.com/users/popcodeorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/popcodeorg/popcode","description":"An HTML/CSS/JavaScript editor for use in the classroom","fork":false,"url":"https://api.github.com/repos/popcodeorg/popcode","forks_url":"https://api.github.com/repos/popcodeorg/popcode/forks","keys_url":"https://api.github.com/repos/popcodeorg/popcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/popcodeorg/popcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/popcodeorg/popcode/teams","hooks_url":"https://api.github.com/repos/popcodeorg/popcode/hooks","issue_events_url":"https://api.github.com/repos/popcodeorg/popcode/issues/events{/number}","events_url":"https://api.github.com/repos/popcodeorg/popcode/events","assignees_url":"https://api.github.com/repos/popcodeorg/popcode/assignees{/user}","branches_url":"https://api.github.com/repos/popcodeorg/popcode/branches{/branch}","tags_url":"https://api.github.com/repos/popcodeorg/popcode/tags","blobs_url":"https://api.github.com/repos/popcodeorg/popcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/popcodeorg/popcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/popcodeorg/popcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/popcodeorg/popcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/popcodeorg/popcode/statuses/{sha}","languages_url":"https://api.github.com/repos/popcodeorg/popcode/languages","stargazers_url":"https://api.github.com/repos/popcodeorg/popcode/stargazers","contributors_url":"https://api.github.com/repos/popcodeorg/popcode/contributors","subscribers_url":"https://api.github.com/repos/popcodeorg/popcode/subscribers","subscription_url":"https://api.github.com/repos/popcodeorg/popcode/subscription","commits_url":"https://api.github.com/repos/popcodeorg/popcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/popcodeorg/popcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/popcodeorg/popcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/popcodeorg/popcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/popcodeorg/popcode/contents/{+path}","compare_url":"https://api.github.com/repos/popcodeorg/popcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/popcodeorg/popcode/merges","archive_url":"https://api.github.com/repos/popcodeorg/popcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/popcodeorg/popcode/downloads","issues_url":"https://api.github.com/repos/popcodeorg/popcode/issues{/number}","pulls_url":"https://api.github.com/repos/popcodeorg/popcode/pulls{/number}","milestones_url":"https://api.github.com/repos/popcodeorg/popcode/milestones{/number}","notifications_url":"https://api.github.com/repos/popcodeorg/popcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/popcodeorg/popcode/labels{/name}","releases_url":"https://api.github.com/repos/popcodeorg/popcode/releases{/id}","deployments_url":"https://api.github.com/repos/popcodeorg/popcode/deployments","created_at":"2015-07-21T01:40:09Z","updated_at":"2016-08-29T03:33:40Z","pushed_at":"2016-09-06T01:59:46Z","git_url":"git://github.com/popcodeorg/popcode.git","ssh_url":"git@github.com:popcodeorg/popcode.git","clone_url":"https://github.com/popcodeorg/popcode.git","svn_url":"https://github.com/popcodeorg/popcode","homepage":null,"size":775,"stargazers_count":21,"watchers_count":21,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/162"},"html":{"href":"https://github.com/popcodeorg/popcode/pull/162"},"issue":{"href":"https://api.github.com/repos/popcodeorg/popcode/issues/162"},"comments":{"href":"https://api.github.com/repos/popcodeorg/popcode/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/popcodeorg/popcode/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/popcodeorg/popcode/statuses/8202057ebb7a2a3c979b4834e620b01524301bdc"}}}}
{"actor":{"display_login":"outoftime"}}