{"action":"created","comment":{"url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/comments/218627256","pull_request_review_id":156608860,"id":218627256,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODYyNzI1Ng==","diff_hunk":"@@ -0,0 +1,608 @@\n+import HelloSign from './embedded';\n+import defaults from './defaults';\n+import pkg from '../package.json';\n+import settings from './settings';\n+\n+const mockSignURL = 'https://app.hellosign.com/editor/embeddedSign?signature_id=abcdef0123456789abcdef0123456789';\n+const mockRequestURL = 'https://app.hellosign.com/editor/embeddedRequest?signature_id=abcdef0123456789abcdef0123456789';\n+const mockClientId = 'abcdef0123456789abcdef0123456789';\n+\n+describe('HelloSign', () => {\n+\n+  afterEach(() => {\n+    // Clear DOM.\n+    document.getElementsByTagName('html')[0].innerHTML = '';\n+  });\n+\n+  test('is defined', () => {\n+    expect(HelloSign).toBeDefined();\n+  });\n+\n+  test('instantiates without errors', () => {\n+    expect(() => new HelloSign()).not.toThrow();\n+  });\n+\n+  test('throws when instantiated without an object', () => {\n+    expect(() => new HelloSign(false)).toThrow(/must be an object/);\n+  });\n+\n+  describe('accessors', () => {\n+\n+    describe('element()', () => {\n+      test('returns the base element', () => {\n+        const client = new HelloSign({ clientId: mockClientId });\n+\n+        client.open(mockSignURL);\n+\n+        expect(client.element).toBeInstanceOf(HTMLElement);\n+\n+        client.close();\n+      });\n+    });\n+\n+    describe('isOpen()', () => {\n+      test('returns the open state', () => {\n+        const client = new HelloSign({ clientId: mockClientId });\n+\n+        expect(client.isOpen).toEqual(false);\n+\n+        client.open(mockSignURL);\n+\n+        expect(client.isOpen).toEqual(true);\n+\n+        client.close();\n+\n+        expect(client.isOpen).toEqual(false);\n+      });\n+    });\n+  });\n+\n+  describe('methods', () => {\n+\n+    describe('open()', () => {\n+\n+      test('closes the old window if embedded is already open', (done) => {\n+        const client = new HelloSign({\n+          clientId: mockClientId,\n+        });\n+\n+        const fn = jest.fn(() => {\n+          expect(fn).toBeCalledTimes(1);","path":"src/embedded.test.js","position":520,"original_position":70,"commit_id":"5ecb3bfead81f70a55d0f7c02b3c1a76f5e0eeef","original_commit_id":"f7890d0956bd760215d5c5d1dbbe1cd45af21f53","user":{"login":"nathanbuchar","id":1815367,"node_id":"MDQ6VXNlcjE4MTUzNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/1815367?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanbuchar","html_url":"https://github.com/nathanbuchar","followers_url":"https://api.github.com/users/nathanbuchar/followers","following_url":"https://api.github.com/users/nathanbuchar/following{/other_user}","gists_url":"https://api.github.com/users/nathanbuchar/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanbuchar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanbuchar/subscriptions","organizations_url":"https://api.github.com/users/nathanbuchar/orgs","repos_url":"https://api.github.com/users/nathanbuchar/repos","events_url":"https://api.github.com/users/nathanbuchar/events{/privacy}","received_events_url":"https://api.github.com/users/nathanbuchar/received_events","type":"User","site_admin":false},"body":"There would be, but `open` is not async","created_at":"2018-09-18T23:32:42Z","updated_at":"2018-09-18T23:32:42Z","html_url":"https://github.com/HelloFax/hellosign-embedded/pull/63#discussion_r218627256","pull_request_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/comments/218627256"},"html":{"href":"https://github.com/HelloFax/hellosign-embedded/pull/63#discussion_r218627256"},"pull_request":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63"}},"in_reply_to_id":218624223},"pull_request":{"url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63","id":209982196,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTgyMTk2","html_url":"https://github.com/HelloFax/hellosign-embedded/pull/63","diff_url":"https://github.com/HelloFax/hellosign-embedded/pull/63.diff","patch_url":"https://github.com/HelloFax/hellosign-embedded/pull/63.patch","issue_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/63","number":63,"state":"open","locked":false,"title":"[DEV-4322] HelloSign Embedded v2","user":{"login":"nathanbuchar","id":1815367,"node_id":"MDQ6VXNlcjE4MTUzNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/1815367?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanbuchar","html_url":"https://github.com/nathanbuchar","followers_url":"https://api.github.com/users/nathanbuchar/followers","following_url":"https://api.github.com/users/nathanbuchar/following{/other_user}","gists_url":"https://api.github.com/users/nathanbuchar/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanbuchar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanbuchar/subscriptions","organizations_url":"https://api.github.com/users/nathanbuchar/orgs","repos_url":"https://api.github.com/users/nathanbuchar/repos","events_url":"https://api.github.com/users/nathanbuchar/events{/privacy}","received_events_url":"https://api.github.com/users/nathanbuchar/received_events","type":"User","site_admin":false},"body":"HelloSign Embedded refactor.\r\n\r\nMessage for squashed commit: \r\n```\r\nrefactor(DEV-4322): HelloSign Embedded v2\r\n\r\nBREAKING CHANGE: `HelloSign` is now a class, not a singleton.\r\nBREAKING CHANGE: `init()` has been deprecated\r\nBREAKING CHANGE: The `url` option is now the first argument of `open()`\r\nBREAKING CHANGE: `open()` options are now defined as the second argument\r\nBREAKING CHANGE: `userCulture` option is now named `locale`\r\nBREAKING CHANGE: `healthCheckoutTimeoutMs` option is now named `timeout`\r\nBREAKING CHANGE: `requester` option is now named `requestingEmail`\r\nBREAKING CHANGE: `messageListener` option has been removed\r\nBREAKING CHANGE: `uxVersion` option has been removed\r\nBREAKING CHANGE: `height` option has been removed\r\nBREAKING CHANGE: `HelloSign.CULTURES` is now `HelloSign.locales`\r\nBREAKING CHANGE: `HelloSign.VERSION` is now `HelloSign.version`\r\n\r\nFixes #27, fixes #31, fixes #36, fixes #40, fixes #47, fixes #57, fixes #75.\r\n```","created_at":"2018-08-21T23:21:56Z","updated_at":"2018-09-18T23:32:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92692349f3d92e3ff5ab79f4500064add85e6f5c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"AsaAyers","id":324999,"node_id":"MDQ6VXNlcjMyNDk5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/324999?v=4","gravatar_id":"","url":"https://api.github.com/users/AsaAyers","html_url":"https://github.com/AsaAyers","followers_url":"https://api.github.com/users/AsaAyers/followers","following_url":"https://api.github.com/users/AsaAyers/following{/other_user}","gists_url":"https://api.github.com/users/AsaAyers/gists{/gist_id}","starred_url":"https://api.github.com/users/AsaAyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AsaAyers/subscriptions","organizations_url":"https://api.github.com/users/AsaAyers/orgs","repos_url":"https://api.github.com/users/AsaAyers/repos","events_url":"https://api.github.com/users/AsaAyers/events{/privacy}","received_events_url":"https://api.github.com/users/AsaAyers/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1014064694,"node_id":"MDU6TGFiZWwxMDE0MDY0Njk0","url":"https://api.github.com/repos/HelloFax/hellosign-embedded/labels/%E2%9A%A0%EF%B8%8F%20fragment","name":"⚠️ fragment","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63/commits","review_comments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63/comments","review_comment_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/63/comments","statuses_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/statuses/5ecb3bfead81f70a55d0f7c02b3c1a76f5e0eeef","head":{"label":"HelloFax:v2","ref":"v2","sha":"5ecb3bfead81f70a55d0f7c02b3c1a76f5e0eeef","user":{"login":"HelloFax","id":584908,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NDkwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/584908?v=4","gravatar_id":"","url":"https://api.github.com/users/HelloFax","html_url":"https://github.com/HelloFax","followers_url":"https://api.github.com/users/HelloFax/followers","following_url":"https://api.github.com/users/HelloFax/following{/other_user}","gists_url":"https://api.github.com/users/HelloFax/gists{/gist_id}","starred_url":"https://api.github.com/users/HelloFax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelloFax/subscriptions","organizations_url":"https://api.github.com/users/HelloFax/orgs","repos_url":"https://api.github.com/users/HelloFax/repos","events_url":"https://api.github.com/users/HelloFax/events{/privacy}","received_events_url":"https://api.github.com/users/HelloFax/received_events","type":"Organization","site_admin":false},"repo":{"id":44194328,"node_id":"MDEwOlJlcG9zaXRvcnk0NDE5NDMyOA==","name":"hellosign-embedded","full_name":"HelloFax/hellosign-embedded","private":false,"owner":{"login":"HelloFax","id":584908,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NDkwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/584908?v=4","gravatar_id":"","url":"https://api.github.com/users/HelloFax","html_url":"https://github.com/HelloFax","followers_url":"https://api.github.com/users/HelloFax/followers","following_url":"https://api.github.com/users/HelloFax/following{/other_user}","gists_url":"https://api.github.com/users/HelloFax/gists{/gist_id}","starred_url":"https://api.github.com/users/HelloFax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelloFax/subscriptions","organizations_url":"https://api.github.com/users/HelloFax/orgs","repos_url":"https://api.github.com/users/HelloFax/repos","events_url":"https://api.github.com/users/HelloFax/events{/privacy}","received_events_url":"https://api.github.com/users/HelloFax/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/HelloFax/hellosign-embedded","description":"Embed HelloSign signature requests and templates in your web application.","fork":false,"url":"https://api.github.com/repos/HelloFax/hellosign-embedded","forks_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/forks","keys_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/teams","hooks_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/hooks","issue_events_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/events{/number}","events_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/events","assignees_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/assignees{/user}","branches_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/branches{/branch}","tags_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/tags","blobs_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/refs{/sha}","trees_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/statuses/{sha}","languages_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/languages","stargazers_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/stargazers","contributors_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/contributors","subscribers_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/subscribers","subscription_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/subscription","commits_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/commits{/sha}","git_commits_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/commits{/sha}","comments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/comments{/number}","issue_comment_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/comments{/number}","contents_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/contents/{+path}","compare_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/merges","archive_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/downloads","issues_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues{/number}","pulls_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls{/number}","milestones_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/milestones{/number}","notifications_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/labels{/name}","releases_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/releases{/id}","deployments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/deployments","created_at":"2015-10-13T17:50:35Z","updated_at":"2018-09-18T21:24:34Z","pushed_at":"2018-09-18T23:22:48Z","git_url":"git://github.com/HelloFax/hellosign-embedded.git","ssh_url":"git@github.com:HelloFax/hellosign-embedded.git","clone_url":"https://github.com/HelloFax/hellosign-embedded.git","svn_url":"https://github.com/HelloFax/hellosign-embedded","homepage":"https://hellosign.com/","size":1053,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":7,"open_issues":9,"watchers":7,"default_branch":"master"}},"base":{"label":"HelloFax:develop","ref":"develop","sha":"66aa7fc971eca36c5c69dbd819948fe9029437cc","user":{"login":"HelloFax","id":584908,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NDkwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/584908?v=4","gravatar_id":"","url":"https://api.github.com/users/HelloFax","html_url":"https://github.com/HelloFax","followers_url":"https://api.github.com/users/HelloFax/followers","following_url":"https://api.github.com/users/HelloFax/following{/other_user}","gists_url":"https://api.github.com/users/HelloFax/gists{/gist_id}","starred_url":"https://api.github.com/users/HelloFax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelloFax/subscriptions","organizations_url":"https://api.github.com/users/HelloFax/orgs","repos_url":"https://api.github.com/users/HelloFax/repos","events_url":"https://api.github.com/users/HelloFax/events{/privacy}","received_events_url":"https://api.github.com/users/HelloFax/received_events","type":"Organization","site_admin":false},"repo":{"id":44194328,"node_id":"MDEwOlJlcG9zaXRvcnk0NDE5NDMyOA==","name":"hellosign-embedded","full_name":"HelloFax/hellosign-embedded","private":false,"owner":{"login":"HelloFax","id":584908,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4NDkwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/584908?v=4","gravatar_id":"","url":"https://api.github.com/users/HelloFax","html_url":"https://github.com/HelloFax","followers_url":"https://api.github.com/users/HelloFax/followers","following_url":"https://api.github.com/users/HelloFax/following{/other_user}","gists_url":"https://api.github.com/users/HelloFax/gists{/gist_id}","starred_url":"https://api.github.com/users/HelloFax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HelloFax/subscriptions","organizations_url":"https://api.github.com/users/HelloFax/orgs","repos_url":"https://api.github.com/users/HelloFax/repos","events_url":"https://api.github.com/users/HelloFax/events{/privacy}","received_events_url":"https://api.github.com/users/HelloFax/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/HelloFax/hellosign-embedded","description":"Embed HelloSign signature requests and templates in your web application.","fork":false,"url":"https://api.github.com/repos/HelloFax/hellosign-embedded","forks_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/forks","keys_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/teams","hooks_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/hooks","issue_events_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/events{/number}","events_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/events","assignees_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/assignees{/user}","branches_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/branches{/branch}","tags_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/tags","blobs_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/refs{/sha}","trees_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/statuses/{sha}","languages_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/languages","stargazers_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/stargazers","contributors_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/contributors","subscribers_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/subscribers","subscription_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/subscription","commits_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/commits{/sha}","git_commits_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/git/commits{/sha}","comments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/comments{/number}","issue_comment_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/comments{/number}","contents_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/contents/{+path}","compare_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/merges","archive_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/downloads","issues_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues{/number}","pulls_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls{/number}","milestones_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/milestones{/number}","notifications_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/labels{/name}","releases_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/releases{/id}","deployments_url":"https://api.github.com/repos/HelloFax/hellosign-embedded/deployments","created_at":"2015-10-13T17:50:35Z","updated_at":"2018-09-18T21:24:34Z","pushed_at":"2018-09-18T23:22:48Z","git_url":"git://github.com/HelloFax/hellosign-embedded.git","ssh_url":"git@github.com:HelloFax/hellosign-embedded.git","clone_url":"https://github.com/HelloFax/hellosign-embedded.git","svn_url":"https://github.com/HelloFax/hellosign-embedded","homepage":"https://hellosign.com/","size":1053,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":7,"open_issues":9,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63"},"html":{"href":"https://github.com/HelloFax/hellosign-embedded/pull/63"},"issue":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/63"},"comments":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/HelloFax/hellosign-embedded/statuses/5ecb3bfead81f70a55d0f7c02b3c1a76f5e0eeef"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nathanbuchar"}}