{"action":"created","comment":{"url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/comments/217258080","pull_request_review_id":154926215,"id":217258080,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzI1ODA4MA==","diff_hunk":"@@ -0,0 +1,295 @@\n+module Test.Component.Main.Page.Resource.Stake exposing (tests)\n+\n+import Component.Main.Page.Resource.Stake exposing (..)\n+import Expect\n+import Test exposing (..)\n+import Util.Validation as Validation\n+    exposing\n+        ( AccountStatus(..)\n+        , MemoStatus(..)\n+        , QuantityStatus(..)\n+        , validateAccount\n+        , validateMemo\n+        , validateQuantity\n+        )\n+\n+\n+\n+-- TODO(boseok): tests for Stake.update\n+\n+\n+tests : Test\n+tests =\n+    describe \"Page.SearchKey module\"\n+        [ describe \"getPercentageOfLiquid\"\n+            [ test \"Percentage10\" <|\n+                \\() ->\n+                    Expect.equal 0.1 (getPercentageOfLiquid Percentage10)\n+            , test \"Percentage50\" <|\n+                \\() ->\n+                    Expect.equal 0.5 (getPercentageOfLiquid Percentage50)\n+            , test \"Percentage70\" <|\n+                \\() ->\n+                    Expect.equal 0.7 (getPercentageOfLiquid Percentage70)\n+            , test \"Percentage100\" <|\n+                \\() ->\n+                    Expect.equal 1 (getPercentageOfLiquid Percentage100)\n+            , test \"NoOp\" <|\n+                \\() ->\n+                    Expect.equal 0 (getPercentageOfLiquid NoOp)\n+            ]\n+        , describe \"validate\"\n+            [ test \"validate test1. modal closed, total = ValidQuantity\" <|\n+                \\() ->\n+                    let\n+                        newModel =\n+                            { delegatebw =\n+                                { from = \"\", receiver = \"\", stakeNetQuantity = \"0.0600 EOS\", stakeCpuQuantity = \"0.2400 EOS\", transfer = 1 }","path":"test/frontend/elm/Test/Component/Main/Page/Resource/Stake.elm","position":47,"original_position":47,"commit_id":"1444afe0f14216033abfe3650460667a567351d7","original_commit_id":"1444afe0f14216033abfe3650460667a567351d7","user":{"login":"basakkang","id":11927038,"node_id":"MDQ6VXNlcjExOTI3MDM4","avatar_url":"https://avatars1.githubusercontent.com/u/11927038?v=4","gravatar_id":"","url":"https://api.github.com/users/basakkang","html_url":"https://github.com/basakkang","followers_url":"https://api.github.com/users/basakkang/followers","following_url":"https://api.github.com/users/basakkang/following{/other_user}","gists_url":"https://api.github.com/users/basakkang/gists{/gist_id}","starred_url":"https://api.github.com/users/basakkang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basakkang/subscriptions","organizations_url":"https://api.github.com/users/basakkang/orgs","repos_url":"https://api.github.com/users/basakkang/repos","events_url":"https://api.github.com/users/basakkang/events{/privacy}","received_events_url":"https://api.github.com/users/basakkang/received_events","type":"User","site_admin":false},"body":"넵 default model을 두도록하겠습니다. 테스트 케이스는 totalQuantity, cpuQuantity, netQuantity 별로 4가지 State, modal open 여부에 따라 가능한 케이스가 많으나, 경우의 수가 너무 많아져서, form이 valid한지 여부에 직결되는 총량이 liquid한 양을 초과하는지 안하는지에 대해서만 일단 테스트를 만들었습니다. 다른 케이스들을 TODO로 남겨두도록 하겠습니다","created_at":"2018-09-13T04:38:08Z","updated_at":"2018-09-13T04:38:09Z","html_url":"https://github.com/EOSYS-io/eoshub.io/pull/110#discussion_r217258080","pull_request_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/comments/217258080"},"html":{"href":"https://github.com/EOSYS-io/eoshub.io/pull/110#discussion_r217258080"},"pull_request":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110"}},"in_reply_to_id":217245122},"pull_request":{"url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110","id":214601773,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NjAxNzcz","html_url":"https://github.com/EOSYS-io/eoshub.io/pull/110","diff_url":"https://github.com/EOSYS-io/eoshub.io/pull/110.diff","patch_url":"https://github.com/EOSYS-io/eoshub.io/pull/110.patch","issue_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/110","number":110,"state":"open","locked":false,"title":"Resource/calculate amount","user":{"login":"basakkang","id":11927038,"node_id":"MDQ6VXNlcjExOTI3MDM4","avatar_url":"https://avatars1.githubusercontent.com/u/11927038?v=4","gravatar_id":"","url":"https://api.github.com/users/basakkang","html_url":"https://github.com/basakkang","followers_url":"https://api.github.com/users/basakkang/followers","following_url":"https://api.github.com/users/basakkang/following{/other_user}","gists_url":"https://api.github.com/users/basakkang/gists{/gist_id}","starred_url":"https://api.github.com/users/basakkang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basakkang/subscriptions","organizations_url":"https://api.github.com/users/basakkang/orgs","repos_url":"https://api.github.com/users/basakkang/repos","events_url":"https://api.github.com/users/basakkang/events{/privacy}","received_events_url":"https://api.github.com/users/basakkang/received_events","type":"User","site_admin":false},"body":"1. Modal이 각 Tab안으로 들어갔습니다.\r\n2. cpu, net 계산 로직과 validation이 추가 되었습니다.\r\n\r\nNOTE\r\n번역 부분은 TODO로 남겨 놓습니다.\r\nviewStakeAmountModal을 module로 떼어내려고 하였으나, Stake 모듈의 Model들을 공유하여 Stake 모듈에 남겨 두었습니다.","created_at":"2018-09-11T11:33:31Z","updated_at":"2018-09-13T04:38:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb3687db20ee9a52f841bdf50393c83148090ded","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110/commits","review_comments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110/comments","review_comment_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/110/comments","statuses_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/statuses/1444afe0f14216033abfe3650460667a567351d7","head":{"label":"EOSYS-io:resource/calculate_amount","ref":"resource/calculate_amount","sha":"1444afe0f14216033abfe3650460667a567351d7","user":{"login":"EOSYS-io","id":39880086,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5ODgwMDg2","avatar_url":"https://avatars0.githubusercontent.com/u/39880086?v=4","gravatar_id":"","url":"https://api.github.com/users/EOSYS-io","html_url":"https://github.com/EOSYS-io","followers_url":"https://api.github.com/users/EOSYS-io/followers","following_url":"https://api.github.com/users/EOSYS-io/following{/other_user}","gists_url":"https://api.github.com/users/EOSYS-io/gists{/gist_id}","starred_url":"https://api.github.com/users/EOSYS-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EOSYS-io/subscriptions","organizations_url":"https://api.github.com/users/EOSYS-io/orgs","repos_url":"https://api.github.com/users/EOSYS-io/repos","events_url":"https://api.github.com/users/EOSYS-io/events{/privacy}","received_events_url":"https://api.github.com/users/EOSYS-io/received_events","type":"Organization","site_admin":false},"repo":{"id":138811568,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg4MTE1Njg=","name":"eoshub.io","full_name":"EOSYS-io/eoshub.io","owner":{"login":"EOSYS-io","id":39880086,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5ODgwMDg2","avatar_url":"https://avatars0.githubusercontent.com/u/39880086?v=4","gravatar_id":"","url":"https://api.github.com/users/EOSYS-io","html_url":"https://github.com/EOSYS-io","followers_url":"https://api.github.com/users/EOSYS-io/followers","following_url":"https://api.github.com/users/EOSYS-io/following{/other_user}","gists_url":"https://api.github.com/users/EOSYS-io/gists{/gist_id}","starred_url":"https://api.github.com/users/EOSYS-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EOSYS-io/subscriptions","organizations_url":"https://api.github.com/users/EOSYS-io/orgs","repos_url":"https://api.github.com/users/EOSYS-io/repos","events_url":"https://api.github.com/users/EOSYS-io/events{/privacy}","received_events_url":"https://api.github.com/users/EOSYS-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EOSYS-io/eoshub.io","description":null,"fork":false,"url":"https://api.github.com/repos/EOSYS-io/eoshub.io","forks_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/forks","keys_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/teams","hooks_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/hooks","issue_events_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/events{/number}","events_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/events","assignees_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/assignees{/user}","branches_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/branches{/branch}","tags_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/tags","blobs_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/statuses/{sha}","languages_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/languages","stargazers_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/stargazers","contributors_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/contributors","subscribers_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/subscribers","subscription_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/subscription","commits_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/contents/{+path}","compare_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/merges","archive_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/downloads","issues_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues{/number}","pulls_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls{/number}","milestones_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/milestones{/number}","notifications_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/labels{/name}","releases_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/releases{/id}","deployments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/deployments","created_at":"2018-06-27T01:06:24Z","updated_at":"2018-09-11T15:01:35Z","pushed_at":"2018-09-13T04:21:54Z","git_url":"git://github.com/EOSYS-io/eoshub.io.git","ssh_url":"git@github.com:EOSYS-io/eoshub.io.git","clone_url":"https://github.com/EOSYS-io/eoshub.io.git","svn_url":"https://github.com/EOSYS-io/eoshub.io","homepage":null,"size":1202,"stargazers_count":4,"watchers_count":4,"language":"Elm","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":4,"default_branch":"alpha"}},"base":{"label":"EOSYS-io:alpha","ref":"alpha","sha":"4ae1da26df26336a4509cd9e99ac63cf611d9708","user":{"login":"EOSYS-io","id":39880086,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5ODgwMDg2","avatar_url":"https://avatars0.githubusercontent.com/u/39880086?v=4","gravatar_id":"","url":"https://api.github.com/users/EOSYS-io","html_url":"https://github.com/EOSYS-io","followers_url":"https://api.github.com/users/EOSYS-io/followers","following_url":"https://api.github.com/users/EOSYS-io/following{/other_user}","gists_url":"https://api.github.com/users/EOSYS-io/gists{/gist_id}","starred_url":"https://api.github.com/users/EOSYS-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EOSYS-io/subscriptions","organizations_url":"https://api.github.com/users/EOSYS-io/orgs","repos_url":"https://api.github.com/users/EOSYS-io/repos","events_url":"https://api.github.com/users/EOSYS-io/events{/privacy}","received_events_url":"https://api.github.com/users/EOSYS-io/received_events","type":"Organization","site_admin":false},"repo":{"id":138811568,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg4MTE1Njg=","name":"eoshub.io","full_name":"EOSYS-io/eoshub.io","owner":{"login":"EOSYS-io","id":39880086,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5ODgwMDg2","avatar_url":"https://avatars0.githubusercontent.com/u/39880086?v=4","gravatar_id":"","url":"https://api.github.com/users/EOSYS-io","html_url":"https://github.com/EOSYS-io","followers_url":"https://api.github.com/users/EOSYS-io/followers","following_url":"https://api.github.com/users/EOSYS-io/following{/other_user}","gists_url":"https://api.github.com/users/EOSYS-io/gists{/gist_id}","starred_url":"https://api.github.com/users/EOSYS-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EOSYS-io/subscriptions","organizations_url":"https://api.github.com/users/EOSYS-io/orgs","repos_url":"https://api.github.com/users/EOSYS-io/repos","events_url":"https://api.github.com/users/EOSYS-io/events{/privacy}","received_events_url":"https://api.github.com/users/EOSYS-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EOSYS-io/eoshub.io","description":null,"fork":false,"url":"https://api.github.com/repos/EOSYS-io/eoshub.io","forks_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/forks","keys_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/teams","hooks_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/hooks","issue_events_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/events{/number}","events_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/events","assignees_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/assignees{/user}","branches_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/branches{/branch}","tags_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/tags","blobs_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/statuses/{sha}","languages_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/languages","stargazers_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/stargazers","contributors_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/contributors","subscribers_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/subscribers","subscription_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/subscription","commits_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/contents/{+path}","compare_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/merges","archive_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/downloads","issues_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues{/number}","pulls_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls{/number}","milestones_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/milestones{/number}","notifications_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/labels{/name}","releases_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/releases{/id}","deployments_url":"https://api.github.com/repos/EOSYS-io/eoshub.io/deployments","created_at":"2018-06-27T01:06:24Z","updated_at":"2018-09-11T15:01:35Z","pushed_at":"2018-09-13T04:21:54Z","git_url":"git://github.com/EOSYS-io/eoshub.io.git","ssh_url":"git@github.com:EOSYS-io/eoshub.io.git","clone_url":"https://github.com/EOSYS-io/eoshub.io.git","svn_url":"https://github.com/EOSYS-io/eoshub.io","homepage":null,"size":1202,"stargazers_count":4,"watchers_count":4,"language":"Elm","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":4,"default_branch":"alpha"}},"_links":{"self":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110"},"html":{"href":"https://github.com/EOSYS-io/eoshub.io/pull/110"},"issue":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/110"},"comments":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/EOSYS-io/eoshub.io/statuses/1444afe0f14216033abfe3650460667a567351d7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"basakkang"}}