{"action":"created","comment":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments/235813129","pull_request_review_id":177767809,"id":235813129,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTgxMzEyOQ==","diff_hunk":"@@ -0,0 +1,54 @@\n+import Foundation\n+import UIKit\n+import XCTest\n+\n+class TBAViewControllerTester<T: UIViewController> {\n+\n+    private(set) var window: UIWindow!\n+\n+    init(withViewController rootViewController: T) {\n+        window = UIWindow(frame: UIScreen.main.bounds)\n+        window.isHidden = false\n+        window.rootViewController = rootViewController\n+\n+        if rootViewController is UINavigationController {\n+            let navigationController = rootViewController as! UINavigationController\n+            appearViewLifecyle(navigationController)\n+            let viewController = navigationController.topViewController!\n+            appearViewLifecyle(viewController)\n+        } else {\n+            appearViewLifecyle(rootViewController)\n+        }\n+    }\n+\n+    deinit {\n+        guard let rootViewController = window.rootViewController as? T else {\n+            XCTFail(\"tearDownTopLevelUI() was called without setupTopLevelUI() being called first\")\n+            return\n+        }\n+\n+        if rootViewController is UINavigationController {\n+            let navigationController = rootViewController as! UINavigationController\n+            let viewController = navigationController.topViewController!\n+            appearViewLifecyle(viewController)\n+        } else {\n+            appearViewLifecyle(rootViewController)\n+        }\n+\n+        window.rootViewController = nil\n+        window.isHidden = true\n+        self.window = nil\n+    }\n+\n+    private func appearViewLifecyle(_ viewController: UIViewController) {\n+        _ = viewController.view\n+        viewController.viewWillAppear(false)\n+        viewController.viewDidAppear(false)","path":"tba-unit-tests/TBAViewControllerTester.swift","position":46,"original_position":46,"commit_id":"afb1f4b0306ea99425cb43a6d9191b7e2a1a6f4b","original_commit_id":"afb1f4b0306ea99425cb43a6d9191b7e2a1a6f4b","user":{"login":"ZachOrr","id":516458,"node_id":"MDQ6VXNlcjUxNjQ1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/516458?v=4","gravatar_id":"","url":"https://api.github.com/users/ZachOrr","html_url":"https://github.com/ZachOrr","followers_url":"https://api.github.com/users/ZachOrr/followers","following_url":"https://api.github.com/users/ZachOrr/following{/other_user}","gists_url":"https://api.github.com/users/ZachOrr/gists{/gist_id}","starred_url":"https://api.github.com/users/ZachOrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZachOrr/subscriptions","organizations_url":"https://api.github.com/users/ZachOrr/orgs","repos_url":"https://api.github.com/users/ZachOrr/repos","events_url":"https://api.github.com/users/ZachOrr/events{/privacy}","received_events_url":"https://api.github.com/users/ZachOrr/received_events","type":"User","site_admin":false},"body":"This just appears to be a problem with when we're setting up that title view. If we setup that `navigationItem` in the init method, the `titleView` gets setup on our first redraw, as opposed to waiting until the first redraw after `viewDidLoad`. This feels like a better fix for the slow title loading then we had before.","created_at":"2018-11-22T20:15:30Z","updated_at":"2018-11-22T20:15:30Z","html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303#discussion_r235813129","pull_request_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments/235813129"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303#discussion_r235813129"},"pull_request":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303"}},"in_reply_to_id":235804923},"pull_request":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303","id":233052648,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMDUyNjQ4","html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303","diff_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303.diff","patch_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303.patch","issue_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/303","number":303,"state":"open","locked":false,"title":"Better view controller snapshot testing","user":{"login":"ZachOrr","id":516458,"node_id":"MDQ6VXNlcjUxNjQ1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/516458?v=4","gravatar_id":"","url":"https://api.github.com/users/ZachOrr","html_url":"https://github.com/ZachOrr","followers_url":"https://api.github.com/users/ZachOrr/followers","following_url":"https://api.github.com/users/ZachOrr/following{/other_user}","gists_url":"https://api.github.com/users/ZachOrr/gists{/gist_id}","starred_url":"https://api.github.com/users/ZachOrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZachOrr/subscriptions","organizations_url":"https://api.github.com/users/ZachOrr/orgs","repos_url":"https://api.github.com/users/ZachOrr/repos","events_url":"https://api.github.com/users/ZachOrr/events{/privacy}","received_events_url":"https://api.github.com/users/ZachOrr/received_events","type":"User","site_admin":false},"body":"Very much WIP, but let's try to land better VC testing with the new Core Data testing stuff in #301 so we can better test our view controllers","created_at":"2018-11-22T18:13:54Z","updated_at":"2018-11-22T20:15:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303/commits","review_comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303/comments","review_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/303/comments","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/afb1f4b0306ea99425cb43a6d9191b7e2a1a6f4b","head":{"label":"the-blue-alliance:zorr/work-on-vc-testing","ref":"zorr/work-on-vc-testing","sha":"afb1f4b0306ea99425cb43a6d9191b7e2a1a6f4b","user":{"login":"the-blue-alliance","id":7354965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNTQ5NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7354965?v=4","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"repo":{"id":18974950,"node_id":"MDEwOlJlcG9zaXRvcnkxODk3NDk1MA==","name":"the-blue-alliance-ios","full_name":"the-blue-alliance/the-blue-alliance-ios","private":false,"owner":{"login":"the-blue-alliance","id":7354965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNTQ5NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7354965?v=4","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","description":"An iOS app for accessing information about the FIRST Robotics Competition.","fork":false,"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios","forks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/forks","keys_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/teams","hooks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/hooks","issue_events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/events{/number}","events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/events","assignees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/assignees{/user}","branches_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/branches{/branch}","tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/tags","blobs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/languages","stargazers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/stargazers","contributors_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contributors","subscribers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscribers","subscription_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscription","commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contents/{+path}","compare_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/merges","archive_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/downloads","issues_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues{/number}","pulls_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/labels{/name}","releases_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/releases{/id}","deployments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/deployments","created_at":"2014-04-20T22:07:09Z","updated_at":"2018-11-22T03:02:00Z","pushed_at":"2018-11-22T18:13:55Z","git_url":"git://github.com/the-blue-alliance/the-blue-alliance-ios.git","ssh_url":"git@github.com:the-blue-alliance/the-blue-alliance-ios.git","clone_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios.git","svn_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","homepage":null,"size":12445,"stargazers_count":33,"watchers_count":33,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":59,"watchers":33,"default_branch":"master"}},"base":{"label":"the-blue-alliance:master","ref":"master","sha":"ede85f21f85e098386f8907b37415b85cc515a07","user":{"login":"the-blue-alliance","id":7354965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNTQ5NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7354965?v=4","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"repo":{"id":18974950,"node_id":"MDEwOlJlcG9zaXRvcnkxODk3NDk1MA==","name":"the-blue-alliance-ios","full_name":"the-blue-alliance/the-blue-alliance-ios","private":false,"owner":{"login":"the-blue-alliance","id":7354965,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczNTQ5NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7354965?v=4","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","description":"An iOS app for accessing information about the FIRST Robotics Competition.","fork":false,"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios","forks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/forks","keys_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/teams","hooks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/hooks","issue_events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/events{/number}","events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/events","assignees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/assignees{/user}","branches_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/branches{/branch}","tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/tags","blobs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/languages","stargazers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/stargazers","contributors_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contributors","subscribers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscribers","subscription_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscription","commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contents/{+path}","compare_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/merges","archive_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/downloads","issues_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues{/number}","pulls_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/labels{/name}","releases_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/releases{/id}","deployments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/deployments","created_at":"2014-04-20T22:07:09Z","updated_at":"2018-11-22T03:02:00Z","pushed_at":"2018-11-22T18:13:55Z","git_url":"git://github.com/the-blue-alliance/the-blue-alliance-ios.git","ssh_url":"git@github.com:the-blue-alliance/the-blue-alliance-ios.git","clone_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios.git","svn_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","homepage":null,"size":12445,"stargazers_count":33,"watchers_count":33,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":59,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/303"},"issue":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/303"},"comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/afb1f4b0306ea99425cb43a6d9191b7e2a1a6f4b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ZachOrr"}}