GitHub PullRequestReviewCommentEvent at 2014-01-13 11:33:07
Repository: fxa-content-server
Actor: shane-tomlinson
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/8822406","id":8822406,"diff_hunk":"@@ -10,96 +10,133 @@ define([\n   'use strict';\n \n   var url = 'http://localhost:3030/birthday';\n-\n-  var ONE_DAY_IN_MS = 1000 * 60 * 60 * 24;\n-  var NOW = new Date();\n-  var YESTERDAY = new Date();\n-  YESTERDAY.setTime(NOW.getTime() - ONE_DAY_IN_MS);\n-\n-  var TOMORROW = new Date();\n-  TOMORROW.setTime(NOW.getTime() + ONE_DAY_IN_MS);\n-\n   var MONTHS = [\n     'jan', 'feb', 'mar', 'apr', 'may', 'jun',\n     'jul', 'aug', 'sep', 'oct', 'nov', 'dec'\n   ];\n \n   registerSuite({\n-    name: 'sign_up',\n+    name: 'birthday',\n \n     'pick a day that is before today - user can register': function () {\n-      var month = MONTHS[YESTERDAY.getMonth()];\n-      var day = YESTERDAY.getDate();\n-\n-      return this.get('remote')\n-        .get(require.toUrl(url))\n-        .waitForElementById('fxa-birthday-header')\n-\n-        .elementById('fxa-month-' + month)\n-          .click()\n-        .end()\n-\n-        .elementById('fxa-day-' + day)\n-          .click()\n-        .end()\n-\n-        .elementById('fxa-birthday-submit')\n-          .click()\n-        .end()\n-\n-        // Success is being redirected to the create account screen.\n-        .waitForElementById('fxa-create-account-header')\n+      var month;\n+      var day;\n+\n+      var remote = this.get('remote')\n+        .eval(\"{ day: new Date(new Date().getTime() - 1000 * 60 * 60 * 24).getDate(), month: new Date(new Date().getTime() - 1000 * 60 * 60 * 24).getMonth() }\")","path":"tests/functional/birthday.js","position":48,"original_position":48,"commit_id":"11be9bbe396e975c2aa4303e6652fe104e39684f","original_commit_id":"7b06f3fabf12bd0eec6447e62dd04918d1163d1d","user":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://gravatar.com/avatar/b7581393f6d1960ea7721789cbbe5c36?d=https%3A%2F%2Fidenticons.github.com%2F9f0443c3ea0cba71cb942a616aea306e.png&r=x","gravatar_id":"b7581393f6d1960ea7721789cbbe5c36","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"body":"I like the trick, I don't like the magic numbers. Can we convert those to something meaningful to humans?","created_at":"2014-01-13T11:33:07Z","updated_at":"2014-01-13T11:33:07Z","html_url":"https://github.com/mozilla/fxa-content-server/pull/210#discussion_r8822406","pull_request_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/210","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/8822406"},"html":{"href":"https://github.com/mozilla/fxa-content-server/pull/210#discussion_r8822406"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/210"}}}}