{"action":"created","comment":{"url":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments/180537870","pull_request_review_id":110974694,"id":180537870,"diff_hunk":"@@ -0,0 +1,73 @@\n+version: 2.0\n+\n+jobs:\n+  checkout-and-install:\n+    docker:\n+      - image: circleci/node:latest\n+    steps:\n+      - checkout\n+      - restore_cache:\n+          key: package-v1-{{ checksum \"package.lock\" }}\n+      - run:\n+          name: Install dependencies\n+          command: yarn install\n+      - persist_to_workspace:\n+          root: ~/\n+          paths: project\n+      - save_cache:\n+          key: package-v1-{{ checksum \"yarn.lock\" }}\n+          paths:\n+            - ~/project/node_modules\n+\n+  eslint:\n+    docker:\n+      - image: circleci/node:latest\n+    steps:\n+      - attach_workspace:\n+          at: ~/\n+      - run:\n+          name: Lint JS\n+          command: yarn eslint --max-warnings=0\n+\n+  stylelint:\n+    docker:\n+      - image: circleci/node:latest\n+    steps:\n+      - attach_workspace:\n+          at: ~/\n+      - run:\n+          name: Lint CSS\n+          command: yarn stylelint\n+\n+  test-chrome:\n+    docker:\n+      - image: circleci/node:latest-browsers\n+    steps:\n+      - attach_workspace:\n+          at: ~/\n+      - run:\n+          name: Run tests\n+          command: yarn test --karma.singleRun --karma.browsers=Chrome","path":".circleci/config.yml","position":50,"original_position":50,"commit_id":"e3395c49649e80a3a718035f36019290e70c4ffa","original_commit_id":"e3395c49649e80a3a718035f36019290e70c4ffa","user":{"login":"cowboyd","id":4205,"avatar_url":"https://avatars2.githubusercontent.com/u/4205?v=4","gravatar_id":"","url":"https://api.github.com/users/cowboyd","html_url":"https://github.com/cowboyd","followers_url":"https://api.github.com/users/cowboyd/followers","following_url":"https://api.github.com/users/cowboyd/following{/other_user}","gists_url":"https://api.github.com/users/cowboyd/gists{/gist_id}","starred_url":"https://api.github.com/users/cowboyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowboyd/subscriptions","organizations_url":"https://api.github.com/users/cowboyd/orgs","repos_url":"https://api.github.com/users/cowboyd/repos","events_url":"https://api.github.com/users/cowboyd/events{/privacy}","received_events_url":"https://api.github.com/users/cowboyd/received_events","type":"User","site_admin":false},"body":"Also, I seem to recall that there was an issue with stripes-cli and passing through karma command line options that might be /cc @ttamj ","created_at":"2018-04-10T19:14:42Z","updated_at":"2018-04-10T19:14:42Z","html_url":"https://github.com/folio-org/stripes-components/pull/320#discussion_r180537870","pull_request_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/320","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/comments/180537870"},"html":{"href":"https://github.com/folio-org/stripes-components/pull/320#discussion_r180537870"},"pull_request":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/320"}},"in_reply_to_id":180537296},"pull_request":{"url":"https://api.github.com/repos/folio-org/stripes-components/pulls/320","id":180397307,"html_url":"https://github.com/folio-org/stripes-components/pull/320","diff_url":"https://github.com/folio-org/stripes-components/pull/320.diff","patch_url":"https://github.com/folio-org/stripes-components/pull/320.patch","issue_url":"https://api.github.com/repos/folio-org/stripes-components/issues/320","number":320,"state":"open","locked":false,"title":"Setup New Testing Environment","user":{"login":"wwilsman","id":5005153,"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":"## Purpose\r\n\r\nThis lays out the groundwork for creating new tests for all of the components. These new tests should live alongside the component in a `tests` directory, and end with `-test` to be picked up by Karma.\r\n\r\nThese tests will be run in a _real_ browser in CircleCI. Later, it should be fairly easy to run our same tests in Firefox, or in Browserstack, so that we can accurately cross-browser test all of our components.\r\n\r\n## Approach\r\n\r\nFirst, I removed the old test files. There were a few existing tests for the dropdown component, but not only could I not get them to pass locally, but the style of the tests does not work well with what is being proposed here.\r\n\r\nSecond, I created a testing \"harness.\" For the **majority** of components, this harness _should be unnecessary_. The harness creates a new `Stripes` instance and provides contexts typically found in a stripes app such as a `Router` and providers for `Redux`, `Intl`, and `Apollo`.\r\n\r\nTo facilitate any necessary requests that must be made to fulfill the okapi redux store's expected shape, [pretender](https://github.com/pretenderjs/pretender) was added. Pretender allows us to fake network requests and provide test-specific data in return. For our components, this _should not_ be needed, but since I do not know how every component works, I added it just in case. \r\n\r\nThird, config for CircleCI was added for linting and testing the components. The tests are run using `stripes-cli`, but there is an expectation in `stripes-cli` that tests can only be performed on apps. So `\"type\": \"app\"` had to be added to the `package.json` file so that `stripes-cli` will run our tests.\r\n\r\nAnd finally, I added some example tests around the `Accordion` component. I only wrote a few to get us started, but with the few I did write I found two issues. One issue is when providing an `id` the accordions stay closed by default regardless of the `closedByDefault` prop. The second issue happens when the component is interacted with quickly after mounting. During this phase the references do not exist yet, so a couple checks were added to verify that the `this.content` reference is made before it is needed.\r\n\r\nThe example tests were written with [BigTest](https://github.com/thefrontside/bigtest), which currently powers all of our tests for [ui-eholdings](https://circleci.com/build-insights/gh/folio-org/ui-eholdings/master).  **Quick video of ui-eholdings tests in action:** https://youtu.be/4B0B29FSGds\r\n\r\n### TODO:\r\n- [ ] Set up CircleCI integration for this repo\r\n\r\n","created_at":"2018-04-09T19:00:27Z","updated_at":"2018-04-10T19:14:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"735b55142f18d4976dd280e2cd5161893175f888","assignee":null,"assignees":[],"requested_reviewers":[{"login":"JohnC-80","id":20704067,"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}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/320/commits","review_comments_url":"https://api.github.com/repos/folio-org/stripes-components/pulls/320/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/320/comments","statuses_url":"https://api.github.com/repos/folio-org/stripes-components/statuses/e3395c49649e80a3a718035f36019290e70c4ffa","head":{"label":"folio-org:stripes-test-harness","ref":"stripes-test-harness","sha":"e3395c49649e80a3a718035f36019290e70c4ffa","user":{"login":"folio-org","id":16495055,"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,"name":"stripes-components","full_name":"folio-org/stripes-components","owner":{"login":"folio-org","id":16495055,"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},"private":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-04-03T21:33:04Z","pushed_at":"2018-04-10T08:49:33Z","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":1793,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":10,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"folio-org:master","ref":"master","sha":"55fad1a57b7337fef5fae7dd6ea4450cd4b06b8a","user":{"login":"folio-org","id":16495055,"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,"name":"stripes-components","full_name":"folio-org/stripes-components","owner":{"login":"folio-org","id":16495055,"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},"private":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-04-03T21:33:04Z","pushed_at":"2018-04-10T08:49:33Z","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":1793,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":10,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/320"},"html":{"href":"https://github.com/folio-org/stripes-components/pull/320"},"issue":{"href":"https://api.github.com/repos/folio-org/stripes-components/issues/320"},"comments":{"href":"https://api.github.com/repos/folio-org/stripes-components/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/folio-org/stripes-components/pulls/320/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/320/commits"},"statuses":{"href":"https://api.github.com/repos/folio-org/stripes-components/statuses/e3395c49649e80a3a718035f36019290e70c4ffa"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"cowboyd"}}