{"action":"created","comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/128200484","pull_request_review_id":50846897,"id":128200484,"diff_hunk":"@@ -298,6 +297,68 @@ class TestUpdates(MachineCase):\n \n         self.allow_restart_journal_messages()\n \n+    def testInfoTruncation(self):\n+        b = self.browser\n+        m = self.machine\n+\n+        # update with not too many binary packages\n+        for i in range(8):\n+            self.createPackage(\"coarse{:02}\".format(i), \"1\", \"1\", install=True)\n+            self.createPackage(\"coarse{:02}\".format(i), \"1\", \"2\", changes=\"make it greener\")\n+\n+        # update with lots of binary packages\n+        for i in range(25):\n+            self.createPackage(\"fine{:02}\".format(i), \"1\", \"1\", install=True)\n+            self.createPackage(\"fine{:02}\".format(i), \"1\", \"2\", changes=\"make it better\")\n+\n+        # update with long changelog\n+        changelog = \"\"\n+        for i in range(30):\n+            changelog += \" - Things change #{:02}\\n\".format(i)\n+        self.createPackage(\"verbose\", \"1\", \"1\", install=True)\n+        self.createPackage(\"verbose\", \"1\", \"2\", changes=changelog)\n+\n+        self.enableRepo()\n+\n+        m.start_cockpit()\n+        b.login_and_go(\"/updates\")\n+\n+        b.wait_present(\"table.listing-ct\")\n+        b.wait_in_text(\"table.listing-ct\", \"Things change #05\")\n+\n+        # \"coarse\" package list should be complete\n+        t = b.text(\"#app .listing-ct tbody:nth-of-type(1) th\")\n+        self.assertIn(\"coarse00\", t)\n+        self.assertIn(\"coarse07\", t)\n+        self.assertNotIn(\"more\", t)\n+\n+        # \"fine\" package list should be truncated\n+        t = b.text(\"#app .listing-ct tbody:nth-of-type(2) th\")\n+        self.assertIn(\"fine00\", t)\n+        self.assertIn(\"fine10\", t)\n+        self.assertNotIn(\"fine20\", t)\n+        b.wait_present(\"#app .listing-ct tbody:nth-of-type(2) th a\")\n+        b.wait_in_text(\"#app .listing-ct tbody:nth-of-type(2) th a\", \"10 more\")\n+\n+        # verbose changelog should be truncated\n+        t = b.text(\"#app .listing-ct tbody:nth-of-type(3) td:nth-of-type(3)\")\n+        self.assertIn(\"Things change #00\", t)\n+        self.assertIn(\"Things change #04\", t)\n+        self.assertNotIn(\"Things change #07\", t)\n+        self.assertNotIn(\"Things change #20\", t)\n+        b.wait_present(\"#app .listing-ct tbody:nth-of-type(3) td:nth-of-type(3) a\")\n+        b.wait_in_text(\"#app .listing-ct tbody:nth-of-type(3) td:nth-of-type(3) a\", \"More information\")\n+\n+        # expand fine package list by clicking on the \"more\" link\n+        b.click(\"#app .listing-ct tbody:nth-of-type(2) th a\")\n+        b.wait_in_text(\"#app .listing-ct tbody:nth-of-type(2) th\", \"fine24\")\n+        b.wait_not_present(\"#app .listing-ct tbody:nth-of-type(2) th a\")","path":"test/verify/check-packagekit","position":67,"original_position":67,"commit_id":"fb7d0b7d0de04f0eef6430d9d2d02464fafbf9a4","original_commit_id":"fb7d0b7d0de04f0eef6430d9d2d02464fafbf9a4","user":{"login":"dperpeet","id":8711649,"avatar_url":"https://avatars3.githubusercontent.com/u/8711649?v=4","gravatar_id":"","url":"https://api.github.com/users/dperpeet","html_url":"https://github.com/dperpeet","followers_url":"https://api.github.com/users/dperpeet/followers","following_url":"https://api.github.com/users/dperpeet/following{/other_user}","gists_url":"https://api.github.com/users/dperpeet/gists{/gist_id}","starred_url":"https://api.github.com/users/dperpeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dperpeet/subscriptions","organizations_url":"https://api.github.com/users/dperpeet/orgs","repos_url":"https://api.github.com/users/dperpeet/repos","events_url":"https://api.github.com/users/dperpeet/events{/privacy}","received_events_url":"https://api.github.com/users/dperpeet/received_events","type":"User","site_admin":false},"body":"see above... if this should only expand the package list, you could add a check here to make sure that only the package list was expanded and not the changelog","created_at":"2017-07-19T09:42:46Z","updated_at":"2017-07-19T09:53:29Z","html_url":"https://github.com/cockpit-project/cockpit/pull/7264#discussion_r128200484","pull_request_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264","_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/128200484"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/7264#discussion_r128200484"},"pull_request":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264"}}},"pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264","id":130749780,"html_url":"https://github.com/cockpit-project/cockpit/pull/7264","diff_url":"https://github.com/cockpit-project/cockpit/pull/7264.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/7264.patch","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/7264","number":7264,"state":"open","locked":false,"title":"Software Updates design improvements","user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"body":" * Distinguishable row border color for security updates (#7170)\r\n * Improve widths of available updates columns (#7171 first part)\r\n * Truncate long package lists/changelogs, with expander (#7171, second part)\r\n\r\nSee the issues above for screenshots.","created_at":"2017-07-16T12:33:23Z","updated_at":"2017-07-19T09:53:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4ad0ea2ab3275b44aa2f3498a04029e57912228","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264/commits","review_comments_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264/comments","review_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/7264/comments","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/fb7d0b7d0de04f0eef6430d9d2d02464fafbf9a4","head":{"label":"martinpitt:updates-design","ref":"updates-design","sha":"fb7d0b7d0de04f0eef6430d9d2d02464fafbf9a4","user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"repo":{"id":77914361,"name":"cockpit","full_name":"martinpitt/cockpit","owner":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars3.githubusercontent.com/u/200109?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinpitt/cockpit","description":"Cockpit, an admin interface for Linux servers","fork":true,"url":"https://api.github.com/repos/martinpitt/cockpit","forks_url":"https://api.github.com/repos/martinpitt/cockpit/forks","keys_url":"https://api.github.com/repos/martinpitt/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinpitt/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinpitt/cockpit/teams","hooks_url":"https://api.github.com/repos/martinpitt/cockpit/hooks","issue_events_url":"https://api.github.com/repos/martinpitt/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/martinpitt/cockpit/events","assignees_url":"https://api.github.com/repos/martinpitt/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/martinpitt/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/martinpitt/cockpit/tags","blobs_url":"https://api.github.com/repos/martinpitt/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinpitt/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinpitt/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinpitt/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinpitt/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/martinpitt/cockpit/languages","stargazers_url":"https://api.github.com/repos/martinpitt/cockpit/stargazers","contributors_url":"https://api.github.com/repos/martinpitt/cockpit/contributors","subscribers_url":"https://api.github.com/repos/martinpitt/cockpit/subscribers","subscription_url":"https://api.github.com/repos/martinpitt/cockpit/subscription","commits_url":"https://api.github.com/repos/martinpitt/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinpitt/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinpitt/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinpitt/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinpitt/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/martinpitt/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinpitt/cockpit/merges","archive_url":"https://api.github.com/repos/martinpitt/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinpitt/cockpit/downloads","issues_url":"https://api.github.com/repos/martinpitt/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/martinpitt/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/martinpitt/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/martinpitt/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinpitt/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/martinpitt/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/martinpitt/cockpit/deployments","created_at":"2017-01-03T12:16:26Z","updated_at":"2017-06-26T08:53:34Z","pushed_at":"2017-07-19T08:58:05Z","git_url":"git://github.com/martinpitt/cockpit.git","ssh_url":"git@github.com:martinpitt/cockpit.git","clone_url":"https://github.com/martinpitt/cockpit.git","svn_url":"https://github.com/martinpitt/cockpit","homepage":"http://www.cockpit-project.org/","size":34472,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_projects":true,"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":2,"default_branch":"master"}},"base":{"label":"cockpit-project:master","ref":"master","sha":"0fa98cde0e1c70c5eb756d560ad94bbd5f3a5485","user":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars2.githubusercontent.com/u/5765104?v=4","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"repo":{"id":14049216,"name":"cockpit","full_name":"cockpit-project/cockpit","owner":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars2.githubusercontent.com/u/5765104?v=4","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockpit-project/cockpit","description":"There's code a goin' on","fork":false,"url":"https://api.github.com/repos/cockpit-project/cockpit","forks_url":"https://api.github.com/repos/cockpit-project/cockpit/forks","keys_url":"https://api.github.com/repos/cockpit-project/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockpit-project/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockpit-project/cockpit/teams","hooks_url":"https://api.github.com/repos/cockpit-project/cockpit/hooks","issue_events_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/cockpit-project/cockpit/events","assignees_url":"https://api.github.com/repos/cockpit-project/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/cockpit-project/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/cockpit-project/cockpit/tags","blobs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockpit-project/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockpit-project/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/cockpit-project/cockpit/languages","stargazers_url":"https://api.github.com/repos/cockpit-project/cockpit/stargazers","contributors_url":"https://api.github.com/repos/cockpit-project/cockpit/contributors","subscribers_url":"https://api.github.com/repos/cockpit-project/cockpit/subscribers","subscription_url":"https://api.github.com/repos/cockpit-project/cockpit/subscription","commits_url":"https://api.github.com/repos/cockpit-project/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockpit-project/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockpit-project/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/cockpit-project/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockpit-project/cockpit/merges","archive_url":"https://api.github.com/repos/cockpit-project/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockpit-project/cockpit/downloads","issues_url":"https://api.github.com/repos/cockpit-project/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/cockpit-project/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/cockpit-project/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockpit-project/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/cockpit-project/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/cockpit-project/cockpit/deployments","created_at":"2013-11-01T17:36:46Z","updated_at":"2017-07-19T06:09:08Z","pushed_at":"2017-07-19T09:31:37Z","git_url":"git://github.com/cockpit-project/cockpit.git","ssh_url":"git@github.com:cockpit-project/cockpit.git","clone_url":"https://github.com/cockpit-project/cockpit.git","svn_url":"https://github.com/cockpit-project/cockpit","homepage":"http://www.cockpit-project.org/","size":34523,"stargazers_count":2204,"watchers_count":2204,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"open_issues_count":431,"forks":317,"open_issues":431,"watchers":2204,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/7264"},"issue":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/7264"},"comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/7264/comments"},"review_comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264/comments"},"review_comment":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/7264/commits"},"statuses":{"href":"https://api.github.com/repos/cockpit-project/cockpit/statuses/fb7d0b7d0de04f0eef6430d9d2d02464fafbf9a4"}}}}
{"actor":{"display_login":"dperpeet"}}