{"action":"created","comment":{"url":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments/229464887","pull_request_review_id":169973506,"id":229464887,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTQ2NDg4Nw==","diff_hunk":"@@ -1,9 +1,66 @@\n import {\n+  collection,\n+  clickable,\n+  hasClass,\n   interactor,\n-  isPresent\n+  isPresent,\n+  is,\n+  count,\n+  text,\n+  computed,\n+  triggerable,\n } from '@bigtest/interactor';\n import css from '../MCLRenderer.css';\n \n+const CellInteractor = interactor(class CellInteractor {\n+  content = text();\n+});\n+\n+const RowInteractor = interactor(class RowInteractor {\n+  isSelected = hasClass(`${css.selected}`);\n+  cellCount = count(`.${css.cell}`);\n+  cells = collection(`.${css.cell}`, CellInteractor);\n+  click = clickable();\n+  isAnchor = is('a');\n+});\n+\n+const HeaderInteractor = interactor(class HeaderInteractor {\n+  isSortHeader = hasClass(`${css.sorted}`);\n+  click = clickable();\n+});\n+\n+function getWidth(selector) {\n+  return computed(function () {\n+    return this.$(selector).offsetWidth;\n+  });\n+}\n+\n+function getHeight(selector) {\n+  return computed(function () {\n+    return this.$(selector).offsetHeight;\n+  });\n+}\n+\n+function getTop(selector) {\n+  return computed(function () {\n+    return this.$(selector).offsetTop;\n+  });\n+}\n+\n export default interactor(class MultiColumnListInteractor {\n   containerPresent = isPresent(`.${css.mclContainer}`);\n+  containerWidth = getWidth(`.${css.mclContainer}`);\n+  containerHeight = getHeight(`.${css.mclContainer}`);\n+  rowCount = count(`.${css.row}`);\n+  columnCount = count(`.${css.header}`);\n+  rows = collection(`.${css.row}`, RowInteractor);\n+  headers = collection(`.${css.header}`, HeaderInteractor);\n+  scrollBodyTop = getTop(`.${css.rowContainer}`);\n+  displaysEmptyMessage = isPresent(`.${css.emptyMessage}`);\n+  displaysLoadingIcon = isPresent(`.${css.contentLoading}`);\n+\n+  scrollBody = function (amount) {\n+    this.$(`.${css.scrollable}`).scrollTop += amount;\n+    return triggerable(`.${css.scrollable}`, 'scroll');","path":"lib/MultiColumnList/tests/interactor.js","position":65,"original_position":65,"commit_id":"8904b01fb693212ccd119cc19df15dcf40d83790","original_commit_id":"8904b01fb693212ccd119cc19df15dcf40d83790","user":{"login":"wwilsman","id":5005153,"node_id":"MDQ6VXNlcjUwMDUxNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5005153?v=4","gravatar_id":"","url":"https://api.github.com/users/wwilsman","html_url":"https://github.com/wwilsman","followers_url":"https://api.github.com/users/wwilsman/followers","following_url":"https://api.github.com/users/wwilsman/following{/other_user}","gists_url":"https://api.github.com/users/wwilsman/gists{/gist_id}","starred_url":"https://api.github.com/users/wwilsman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwilsman/subscriptions","organizations_url":"https://api.github.com/users/wwilsman/orgs","repos_url":"https://api.github.com/users/wwilsman/repos","events_url":"https://api.github.com/users/wwilsman/events{/privacy}","received_events_url":"https://api.github.com/users/wwilsman/received_events","type":"User","site_admin":false},"body":"This is exactly what `scrollable` is supposed to do when passed `{ top: amount }`.\r\n\r\n```js\r\nscrollBody = scrollable(`.${css.scrollable}`)\r\n// ...\r\nmcl.scrollBody({ top: amount });\r\n```\r\n\r\nAny more info on what issue you were having with it? Was it just not scrolling properly?\r\n\r\nAlso, `triggerable` returns a property descriptor, you want `this.trigger(selector, 'scroll')` here instead.","created_at":"2018-10-30T20:03:23Z","updated_at":"2018-10-30T20:03:24Z","html_url":"https://github.com/folio-org/stripes-components/pull/679#discussion_r229464887","pull_request_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/679","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments/229464887"},"html":{"href":"https://github.com/folio-org/stripes-components/pull/679#discussion_r229464887"},"pull_request":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/679"}}},"pull_request":{"url":"https://api.github.com/repos/folio-org/stripes-components/pulls/679","id":227058352,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MDU4MzUy","html_url":"https://github.com/folio-org/stripes-components/pull/679","diff_url":"https://github.com/folio-org/stripes-components/pull/679.diff","patch_url":"https://github.com/folio-org/stripes-components/pull/679.patch","issue_url":"https://api.github.com/repos/folio-org/stripes-components/issues/679","number":679,"state":"open","locked":false,"title":"MCL Tests","user":{"login":"JohnC-80","id":20704067,"node_id":"MDQ6VXNlcjIwNzA0MDY3","avatar_url":"https://avatars1.githubusercontent.com/u/20704067?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnC-80","html_url":"https://github.com/JohnC-80","followers_url":"https://api.github.com/users/JohnC-80/followers","following_url":"https://api.github.com/users/JohnC-80/following{/other_user}","gists_url":"https://api.github.com/users/JohnC-80/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnC-80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnC-80/subscriptions","organizations_url":"https://api.github.com/users/JohnC-80/orgs","repos_url":"https://api.github.com/users/JohnC-80/repos","events_url":"https://api.github.com/users/JohnC-80/events{/privacy}","received_events_url":"https://api.github.com/users/JohnC-80/received_events","type":"User","site_admin":false},"body":"# Purpose\r\nA layer of tests for basic rendering of data, transitions between common props, and windowing as we approach a refactor.\r\n\r\n## Approach\r\nI employed `faker.js` to generate fake data via a utility function. The tests include a few raw component tests and a few within a harness to test transitions between props (loading data, visible columns etc) in a similar fashion to the way MCL might be used within an app.\r\nI ran into a bit of difficulty trying to use BigTest's `scrollable` interactor, and ended up having to perform an equivalent via `triggerable`.\r\n\r\n","created_at":"2018-10-30T19:49:43Z","updated_at":"2018-10-30T20:03:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"561894c1857619c57b06df787582b5a29c00a7b8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cherewaty","id":230597,"node_id":"MDQ6VXNlcjIzMDU5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/230597?v=4","gravatar_id":"","url":"https://api.github.com/users/cherewaty","html_url":"https://github.com/cherewaty","followers_url":"https://api.github.com/users/cherewaty/followers","following_url":"https://api.github.com/users/cherewaty/following{/other_user}","gists_url":"https://api.github.com/users/cherewaty/gists{/gist_id}","starred_url":"https://api.github.com/users/cherewaty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cherewaty/subscriptions","organizations_url":"https://api.github.com/users/cherewaty/orgs","repos_url":"https://api.github.com/users/cherewaty/repos","events_url":"https://api.github.com/users/cherewaty/events{/privacy}","received_events_url":"https://api.github.com/users/cherewaty/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/679/commits","review_comments_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/679/comments","review_comment_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/folio-org/stripes-components/issues/679/comments","statuses_url":"https://api.github.com/repos/folio-org/stripes-components/statuses/8904b01fb693212ccd119cc19df15dcf40d83790","head":{"label":"folio-org:mcl-tests","ref":"mcl-tests","sha":"8904b01fb693212ccd119cc19df15dcf40d83790","user":{"login":"folio-org","id":16495055,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDk1MDU1","avatar_url":"https://avatars2.githubusercontent.com/u/16495055?v=4","gravatar_id":"","url":"https://api.github.com/users/folio-org","html_url":"https://github.com/folio-org","followers_url":"https://api.github.com/users/folio-org/followers","following_url":"https://api.github.com/users/folio-org/following{/other_user}","gists_url":"https://api.github.com/users/folio-org/gists{/gist_id}","starred_url":"https://api.github.com/users/folio-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folio-org/subscriptions","organizations_url":"https://api.github.com/users/folio-org/orgs","repos_url":"https://api.github.com/users/folio-org/repos","events_url":"https://api.github.com/users/folio-org/events{/privacy}","received_events_url":"https://api.github.com/users/folio-org/received_events","type":"Organization","site_admin":false},"repo":{"id":71479583,"node_id":"MDEwOlJlcG9zaXRvcnk3MTQ3OTU4Mw==","name":"stripes-components","full_name":"folio-org/stripes-components","private":false,"owner":{"login":"folio-org","id":16495055,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDk1MDU1","avatar_url":"https://avatars2.githubusercontent.com/u/16495055?v=4","gravatar_id":"","url":"https://api.github.com/users/folio-org","html_url":"https://github.com/folio-org","followers_url":"https://api.github.com/users/folio-org/followers","following_url":"https://api.github.com/users/folio-org/following{/other_user}","gists_url":"https://api.github.com/users/folio-org/gists{/gist_id}","starred_url":"https://api.github.com/users/folio-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folio-org/subscriptions","organizations_url":"https://api.github.com/users/folio-org/orgs","repos_url":"https://api.github.com/users/folio-org/repos","events_url":"https://api.github.com/users/folio-org/events{/privacy}","received_events_url":"https://api.github.com/users/folio-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/folio-org/stripes-components","description":"A component library for Stripes","fork":false,"url":"https://api.github.com/repos/folio-org/stripes-components","forks_url":"https://api.github.com/repos/folio-org/stripes-components/forks","keys_url":"https://api.github.com/repos/folio-org/stripes-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/folio-org/stripes-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/folio-org/stripes-components/teams","hooks_url":"https://api.github.com/repos/folio-org/stripes-components/hooks","issue_events_url":"https://api.github.com/repos/folio-org/stripes-components/issues/events{/number}","events_url":"https://api.github.com/repos/folio-org/stripes-components/events","assignees_url":"https://api.github.com/repos/folio-org/stripes-components/assignees{/user}","branches_url":"https://api.github.com/repos/folio-org/stripes-components/branches{/branch}","tags_url":"https://api.github.com/repos/folio-org/stripes-components/tags","blobs_url":"https://api.github.com/repos/folio-org/stripes-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/folio-org/stripes-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/folio-org/stripes-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/folio-org/stripes-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/folio-org/stripes-components/statuses/{sha}","languages_url":"https://api.github.com/repos/folio-org/stripes-components/languages","stargazers_url":"https://api.github.com/repos/folio-org/stripes-components/stargazers","contributors_url":"https://api.github.com/repos/folio-org/stripes-components/contributors","subscribers_url":"https://api.github.com/repos/folio-org/stripes-components/subscribers","subscription_url":"https://api.github.com/repos/folio-org/stripes-components/subscription","commits_url":"https://api.github.com/repos/folio-org/stripes-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/folio-org/stripes-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/folio-org/stripes-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/folio-org/stripes-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/folio-org/stripes-components/contents/{+path}","compare_url":"https://api.github.com/repos/folio-org/stripes-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/folio-org/stripes-components/merges","archive_url":"https://api.github.com/repos/folio-org/stripes-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/folio-org/stripes-components/downloads","issues_url":"https://api.github.com/repos/folio-org/stripes-components/issues{/number}","pulls_url":"https://api.github.com/repos/folio-org/stripes-components/pulls{/number}","milestones_url":"https://api.github.com/repos/folio-org/stripes-components/milestones{/number}","notifications_url":"https://api.github.com/repos/folio-org/stripes-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/folio-org/stripes-components/labels{/name}","releases_url":"https://api.github.com/repos/folio-org/stripes-components/releases{/id}","deployments_url":"https://api.github.com/repos/folio-org/stripes-components/deployments","created_at":"2016-10-20T15:55:46Z","updated_at":"2018-10-30T17:25:45Z","pushed_at":"2018-10-30T19:49:43Z","git_url":"git://github.com/folio-org/stripes-components.git","ssh_url":"git@github.com:folio-org/stripes-components.git","clone_url":"https://github.com/folio-org/stripes-components.git","svn_url":"https://github.com/folio-org/stripes-components","homepage":null,"size":3333,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"folio-org:master","ref":"master","sha":"2229e11c0622303eb31042b40141124f900b91b0","user":{"login":"folio-org","id":16495055,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDk1MDU1","avatar_url":"https://avatars2.githubusercontent.com/u/16495055?v=4","gravatar_id":"","url":"https://api.github.com/users/folio-org","html_url":"https://github.com/folio-org","followers_url":"https://api.github.com/users/folio-org/followers","following_url":"https://api.github.com/users/folio-org/following{/other_user}","gists_url":"https://api.github.com/users/folio-org/gists{/gist_id}","starred_url":"https://api.github.com/users/folio-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folio-org/subscriptions","organizations_url":"https://api.github.com/users/folio-org/orgs","repos_url":"https://api.github.com/users/folio-org/repos","events_url":"https://api.github.com/users/folio-org/events{/privacy}","received_events_url":"https://api.github.com/users/folio-org/received_events","type":"Organization","site_admin":false},"repo":{"id":71479583,"node_id":"MDEwOlJlcG9zaXRvcnk3MTQ3OTU4Mw==","name":"stripes-components","full_name":"folio-org/stripes-components","private":false,"owner":{"login":"folio-org","id":16495055,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDk1MDU1","avatar_url":"https://avatars2.githubusercontent.com/u/16495055?v=4","gravatar_id":"","url":"https://api.github.com/users/folio-org","html_url":"https://github.com/folio-org","followers_url":"https://api.github.com/users/folio-org/followers","following_url":"https://api.github.com/users/folio-org/following{/other_user}","gists_url":"https://api.github.com/users/folio-org/gists{/gist_id}","starred_url":"https://api.github.com/users/folio-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folio-org/subscriptions","organizations_url":"https://api.github.com/users/folio-org/orgs","repos_url":"https://api.github.com/users/folio-org/repos","events_url":"https://api.github.com/users/folio-org/events{/privacy}","received_events_url":"https://api.github.com/users/folio-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/folio-org/stripes-components","description":"A component library for Stripes","fork":false,"url":"https://api.github.com/repos/folio-org/stripes-components","forks_url":"https://api.github.com/repos/folio-org/stripes-components/forks","keys_url":"https://api.github.com/repos/folio-org/stripes-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/folio-org/stripes-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/folio-org/stripes-components/teams","hooks_url":"https://api.github.com/repos/folio-org/stripes-components/hooks","issue_events_url":"https://api.github.com/repos/folio-org/stripes-components/issues/events{/number}","events_url":"https://api.github.com/repos/folio-org/stripes-components/events","assignees_url":"https://api.github.com/repos/folio-org/stripes-components/assignees{/user}","branches_url":"https://api.github.com/repos/folio-org/stripes-components/branches{/branch}","tags_url":"https://api.github.com/repos/folio-org/stripes-components/tags","blobs_url":"https://api.github.com/repos/folio-org/stripes-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/folio-org/stripes-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/folio-org/stripes-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/folio-org/stripes-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/folio-org/stripes-components/statuses/{sha}","languages_url":"https://api.github.com/repos/folio-org/stripes-components/languages","stargazers_url":"https://api.github.com/repos/folio-org/stripes-components/stargazers","contributors_url":"https://api.github.com/repos/folio-org/stripes-components/contributors","subscribers_url":"https://api.github.com/repos/folio-org/stripes-components/subscribers","subscription_url":"https://api.github.com/repos/folio-org/stripes-components/subscription","commits_url":"https://api.github.com/repos/folio-org/stripes-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/folio-org/stripes-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/folio-org/stripes-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/folio-org/stripes-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/folio-org/stripes-components/contents/{+path}","compare_url":"https://api.github.com/repos/folio-org/stripes-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/folio-org/stripes-components/merges","archive_url":"https://api.github.com/repos/folio-org/stripes-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/folio-org/stripes-components/downloads","issues_url":"https://api.github.com/repos/folio-org/stripes-components/issues{/number}","pulls_url":"https://api.github.com/repos/folio-org/stripes-components/pulls{/number}","milestones_url":"https://api.github.com/repos/folio-org/stripes-components/milestones{/number}","notifications_url":"https://api.github.com/repos/folio-org/stripes-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/folio-org/stripes-components/labels{/name}","releases_url":"https://api.github.com/repos/folio-org/stripes-components/releases{/id}","deployments_url":"https://api.github.com/repos/folio-org/stripes-components/deployments","created_at":"2016-10-20T15:55:46Z","updated_at":"2018-10-30T17:25:45Z","pushed_at":"2018-10-30T19:49:43Z","git_url":"git://github.com/folio-org/stripes-components.git","ssh_url":"git@github.com:folio-org/stripes-components.git","clone_url":"https://github.com/folio-org/stripes-components.git","svn_url":"https://github.com/folio-org/stripes-components","homepage":null,"size":3333,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/679"},"html":{"href":"https://github.com/folio-org/stripes-components/pull/679"},"issue":{"href":"https://api.github.com/repos/folio-org/stripes-components/issues/679"},"comments":{"href":"https://api.github.com/repos/folio-org/stripes-components/issues/679/comments"},"review_comments":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/679/comments"},"review_comment":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/679/commits"},"statuses":{"href":"https://api.github.com/repos/folio-org/stripes-components/statuses/8904b01fb693212ccd119cc19df15dcf40d83790"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wwilsman"}}