{"action":"created","issue":{"url":"https://api.github.com/repos/status-im/status-react/issues/3385","repository_url":"https://api.github.com/repos/status-im/status-react","labels_url":"https://api.github.com/repos/status-im/status-react/issues/3385/labels{/name}","comments_url":"https://api.github.com/repos/status-im/status-react/issues/3385/comments","events_url":"https://api.github.com/repos/status-im/status-react/issues/3385/events","html_url":"https://github.com/status-im/status-react/pull/3385","id":298631413,"number":3385,"title":"Refactor timestamp","user":{"login":"voxlet","id":156545,"avatar_url":"https://avatars0.githubusercontent.com/u/156545?v=4","gravatar_id":"","url":"https://api.github.com/users/voxlet","html_url":"https://github.com/voxlet","followers_url":"https://api.github.com/users/voxlet/followers","following_url":"https://api.github.com/users/voxlet/following{/other_user}","gists_url":"https://api.github.com/users/voxlet/gists{/gist_id}","starred_url":"https://api.github.com/users/voxlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voxlet/subscriptions","organizations_url":"https://api.github.com/users/voxlet/orgs","repos_url":"https://api.github.com/users/voxlet/repos","events_url":"https://api.github.com/users/voxlet/events{/privacy}","received_events_url":"https://api.github.com/users/voxlet/received_events","type":"User","site_admin":false},"labels":[{"id":523025415,"url":"https://api.github.com/repos/status-im/status-react/labels/bounty","name":"bounty","color":"FAFAD2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-20T15:15:48Z","updated_at":"2018-03-04T14:49:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/status-im/status-react/pulls/3385","html_url":"https://github.com/status-im/status-react/pull/3385","diff_url":"https://github.com/status-im/status-react/pull/3385.diff","patch_url":"https://github.com/status-im/status-react/pull/3385.patch"},"body":"[comment]: # (Please replace ... with your information. Remove < and >)\r\n[comment]: # (To auto-close issue on merge, please insert the related issue number after # i.e fixes #566)\r\n\r\nFixes #3304\r\n\r\n### Summary:\r\n\r\n[comment]: # (Summarise the problem and how the pull request solves it)\r\n\r\n- rename utils.datetime/now-ms to timestamp\r\n- replace protocol.web3.utils/timestamp with utils.datetime/timestamp\r\n- replace cljs-time with inst-ms in timestamp\r\n\r\n### Review notes\r\n\r\nGetting the current timestamp seemed to be a common enough use case, so I kept the utils.datetime version (as it is higher up the hierarchy as a util namespace) instead of replacing all calls of now-ms/timestamp with `(inst-ms (js/Date.))`.\r\n\r\nFor the name change from `now-ms` to `timestamp`:\r\n- `timestamp` feels more descriptive of intent\r\n- we can visualize impacted call sites in diff\r\n\r\n### Steps to test:\r\n\r\nInterleave quick calls to the old and new implementations, and check the results monotonically increase. This is crude, but should be good enough to prove there is no behavior change between the two.\r\n\r\nIn REPL:\r\n```\r\n(do\r\n    (defn old-timestamp []\r\n      (cljs-time.coerce/to-long (cljs-time.core/now)))\r\n\r\n    ;; interleave calls eagerly with reduce\r\n    (->> (reduce\r\n           (fn [z _]\r\n             (into z [(old-timestamp) (status-im.utils.datetime/timestamp)]))\r\n           [] (range 100000))\r\n         (apply <=)))\r\n=> true\r\n```\r\n\r\nstatus: ready\r\n"},"comment":{"url":"https://api.github.com/repos/status-im/status-react/issues/comments/370234944","html_url":"https://github.com/status-im/status-react/pull/3385#issuecomment-370234944","issue_url":"https://api.github.com/repos/status-im/status-react/issues/3385","id":370234944,"user":{"login":"statustestbot","id":36031972,"avatar_url":"https://avatars3.githubusercontent.com/u/36031972?v=4","gravatar_id":"","url":"https://api.github.com/users/statustestbot","html_url":"https://github.com/statustestbot","followers_url":"https://api.github.com/users/statustestbot/followers","following_url":"https://api.github.com/users/statustestbot/following{/other_user}","gists_url":"https://api.github.com/users/statustestbot/gists{/gist_id}","starred_url":"https://api.github.com/users/statustestbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statustestbot/subscriptions","organizations_url":"https://api.github.com/users/statustestbot/orgs","repos_url":"https://api.github.com/users/statustestbot/repos","events_url":"https://api.github.com/users/statustestbot/events{/privacy}","received_events_url":"https://api.github.com/users/statustestbot/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T14:49:49Z","updated_at":"2018-03-04T14:49:49Z","author_association":"NONE","body":"## 81% of end-end tests have passed\n```\nTotal executed tests: 16\nFailed tests: 3\nPassed tests: 13\n```\n<h3>Failed tests (3)</h3><details><summary>Click to expand</summary><br/><table style=\"width: 100%\"><colgroup><col span=\"1\" style=\"width: 20%;\"><col span=\"1\" style=\"width: 80%;\"></colgroup><tbody><tr></tr><tr><td><b>1. test_one_to_one_chat_messages_and_delete_chat</b></td></tr><tr><td><p><blockquote><div>Wait for PlusButton</div><div>Looking for an element by text part: 'Test Name'</div></blockquote></p><code>E   Failed: Message with text \"abc !@#$%%^&(() bold\" was not received</code><br/><br/><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/b9bdab0b37d546769b66fc1079c73e36?auth=54d1fedfe91ca6451b881337e8abedca\">Device 1</a></li><li><a href=\"https://saucelabs.com/jobs/e435de2875f1442b9b6ff560fd491b4d?auth=49c6de284f7753ba9b410bad96438671\">Device 2</a></li></ul></p></td></tr><tr><td><b>2. test_contact_profile_view</b></td></tr><tr><td><p><blockquote><div>Tap on ChatOptions</div><div>Looking for ViewProfileButton</div></blockquote></p><code>E   selenium.common.exceptions.NoSuchElementException: Message: 'ViewProfileButton' is not found on screen, using: 'xpath://*[@text=\"View profile\"]'</code><br/><br/><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/383a2a24f5c94450908578b33e7afc79?auth=08643e371c030a412ce12b244d8b8aac\">Device 1</a></li></ul></p></td></tr><tr><td><b>3. test_group_chat_messages</b></td></tr><tr><td><code>E   selenium.common.exceptions.WebDriverException: Message: The test with session id 062c0fc852114ed3906122f6256361f7 has already finished, and can't receive further commands.\n    You can learn more at https://saucelabs.com/jobs/062c0fc852114ed3906122f6256361f7\n    For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages</code><br/><br/><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/fc8c3cc53ea945c7938a7d7cf107bf57?auth=bce082172e048778f6042c85206d6609\">Device 1</a></li></ul></p></td></tr></tbody></table></details><h3>Passed tests (13)</h3><details><summary>Click to expand</summary><br/><table style=\"width: 100%\"><colgroup><col span=\"1\" style=\"width: 20%;\"><col span=\"1\" style=\"width: 80%;\"></colgroup><tbody><tr></tr><tr><td><b>1. test_send_transaction_from_daap</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/4fc3d54aafb44ef0b23a516f54fd7b9a?auth=21de0c2d732021cd200cbe519a9cac59\">Device 1</a></li></ul></p></td></tr><tr><td><b>2. test_send_eth_from_wallet_sign_now</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/4fdbef63f9814b539db8019bb6cad1ac?auth=7609e469516086260b83d6e07f89fe4b\">Device 1</a></li></ul></p></td></tr><tr><td><b>3. test_send_eth_to_request_from_wallet</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/f278eee05ab346eabb924486ef74b1f9?auth=2c27c16ff88c0b2d7f3e51f5dd74366c\">Device 1</a></li><li><a href=\"https://saucelabs.com/jobs/c542f434f1c54f06ab14f2f1336f406d?auth=307133006ed88bcefaed182293a86a79\">Device 2</a></li></ul></p></td></tr><tr><td><b>4. test_public_chat</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/d4eab1ecde444d4481f82e9e5867a8aa?auth=7c85f98d3da9f4a5f86f33b5b4742c84\">Device 1</a></li><li><a href=\"https://saucelabs.com/jobs/eab6d703587e4e8d864065a52de2f233?auth=ee0265b218b8ea082566fb4dc4e8c410\">Device 2</a></li></ul></p></td></tr><tr><td><b>5. test_network_switch</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/0465b2ce232742bcb550c63ce7411a0d?auth=db76e7fa0ceaf73787f3c102bb76cf92\">Device 1</a></li></ul></p></td></tr><tr><td><b>6. test_transaction_send_command_one_to_one_chat</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/0caf08653b5542ecb4db5497dd9cd80d?auth=15cbfdb79d8eefb0705e7f11df0b8e97\">Device 1</a></li></ul></p></td></tr><tr><td><b>7. test_browse_link_entering_url_in_dapp_view</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/7c05d46a5d344008af54c57fa50060a9?auth=5cabc4512a4324bf4804ee6b9bab68a2\">Device 1</a></li></ul></p></td></tr><tr><td><b>8. test_transaction_send_command_wrong_password</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/d43bae3108c14f8486d45b96d42ce764?auth=d86210e916ff2f82b3b7f78c0c055ce6\">Device 1</a></li></ul></p></td></tr><tr><td><b>9. test_send_eth_to_request_in_one_to_one_chat</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/74aa309b8b644bd58d1b415029a045bc?auth=e2898677f175c7b39ced0342ce1e75f2\">Device 1</a></li><li><a href=\"https://saucelabs.com/jobs/7b609bd69690418ba105ac47bea598e6?auth=1794a1fa65f1e807730c474e9d0c5b3b\">Device 2</a></li></ul></p></td></tr><tr><td><b>10. test_send_stt_from_wallet_via_enter_recipient_address</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/e0421b1d41374cfe99e0dd6988f0f6d1?auth=8da0ccd6b1539631767964dc78c24aee\">Device 1</a></li></ul></p></td></tr><tr><td><b>11. test_send_eth_to_request_in_group_chat</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/dc284c1eabeb4b6582806db767ac59f3?auth=7a28ed92977c4b988c8dda6395a7c45c\">Device 1</a></li><li><a href=\"https://saucelabs.com/jobs/f31b55e92b41475f9b724d678685b516?auth=76aad6ad44c69f10313a6cc1016b7d95\">Device 2</a></li></ul></p></td></tr><tr><td><b>12. test_transaction_send_command_group_chat</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/b9ae4f9b693449398f21103b319c5c83?auth=1c8adaa4eb27d24fac5025e634a71896\">Device 1</a></li></ul></p></td></tr><tr><td><b>13. test_send_eth_from_wallet_sign_later</b></td></tr><tr><td><ins>Device sessions:</ins><p><ul><li><a href=\"https://saucelabs.com/jobs/d05e2d7fe8c84674880614ed6349d907?auth=3b336a3a871249fa9eb5b85cba843b30\">Device 1</a></li></ul></p></td></tr></tbody></table></details>"}}
{"actor":{"display_login":"statustestbot"}}