{"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/26029222","id":26029222,"diff_hunk":"@@ -0,0 +1,105 @@\n+//-- copyright\n+// OpenProject is a project management system.\n+// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)\n+//\n+// This program is free software; you can redistribute it and/or\n+// modify it under the terms of the GNU General Public License version 3.\n+//\n+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:\n+// Copyright (C) 2006-2013 Jean-Philippe Lang\n+// Copyright (C) 2010-2013 the ChiliProject Team\n+//\n+// This program is free software; you can redistribute it and/or\n+// modify it under the terms of the GNU General Public License\n+// as published by the Free Software Foundation; either version 2\n+// of the License, or (at your option) any later version.\n+//\n+// This program is distributed in the hope that it will be useful,\n+// but WITHOUT ANY WARRANTY; without even the implied warranty of\n+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+// GNU General Public License for more details.\n+//\n+// You should have received a copy of the GNU General Public License\n+// along with this program; if not, write to the Free Software\n+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n+//\n+// See doc/COPYRIGHT.rdoc for more details.\n+//++\n+\n+var expect = require('../../../spec_helper.js').expect, \n+    detailsPaneHelper = require('./details-pane-helper.js');\n+\n+\n+describe('details pane', function() {\n+  var dateRangePicker;\n+\n+  beforeEach(function() {\n+    detailsPaneHelper.loadPane(819, 'overview');\n+    dateRangePicker = $('.inplace-editor.type-daterange');\n+  });\n+  \n+  describe('date range picker', function() {\n+    context('read value', function() {\n+      it('should be present on page', function(){\n+        expect(dateRangePicker.isPresent()).to.eventually.be.true;\n+      });\n+\n+      it('shows date range', function() {\n+        expect(dateRangePicker.getText()).to.eventually.equal(\"10/23/2014 - 12/27/2014\");\n+      });\n+    });\n+\n+    context('write value', function() {\n+      beforeEach(function() {\n+        dateRangePicker.$('.ined-read-value').click();\n+      });\n+\n+      it('opens calendar on click', function() {\n+        expect(dateRangePicker.$('.ui-datepicker').isDisplayed()).to.eventually.be.true;\n+      });\n+\n+      it('shows date range in input', function() {\n+        dateRangePicker.$(\"[ng-model='daterange']\").getText(function(text) {\n+          expect(text).to.equal(\"10/23/2014 - 12/27/2014\");\n+        });\n+      });\n+\n+      describe('range selection', function() {\n+        it('changes start date by clicking on calendar', function() {\n+          element.all(by.css(\"a.ui-state-default\")).filter(function(elem, index){\n+            return elem.getText().then(function(text) {\n+              return text.indexOf('9') !== -1;\n+            });\n+          }).then(function(filteredElements) {\n+            filteredElements[0].click();\n+            dateRangePicker.$(\"[ng-model='daterange']\").getText(function(text) {\n+              expect(text).to.equal(\"12/09/2014 - 12/27/2014\");","path":"frontend/tests/integration/specs/work-packages/details-pane/date-range-picker-spec.js","position":76,"original_position":76,"commit_id":"5922c93d1cf70eec0b83fa05494fe9fd7330414f","original_commit_id":"5922c93d1cf70eec0b83fa05494fe9fd7330414f","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Mixed double and single quotes.","created_at":"2015-03-09T11:46:57Z","updated_at":"2015-03-09T11:46:57Z","html_url":"https://github.com/opf/openproject/pull/2662#discussion_r26029222","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/2662","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/26029222"},"html":{"href":"https://github.com/opf/openproject/pull/2662#discussion_r26029222"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/2662"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/2662","id":30545135,"html_url":"https://github.com/opf/openproject/pull/2662","diff_url":"https://github.com/opf/openproject/pull/2662.diff","patch_url":"https://github.com/opf/openproject/pull/2662.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/2662","number":2662,"state":"open","locked":false,"title":"17419 Date range picker in place editor","user":{"login":"hirtie-maxim","id":6662687,"avatar_url":"https://avatars.githubusercontent.com/u/6662687?v=3","gravatar_id":"","url":"https://api.github.com/users/hirtie-maxim","html_url":"https://github.com/hirtie-maxim","followers_url":"https://api.github.com/users/hirtie-maxim/followers","following_url":"https://api.github.com/users/hirtie-maxim/following{/other_user}","gists_url":"https://api.github.com/users/hirtie-maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/hirtie-maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirtie-maxim/subscriptions","organizations_url":"https://api.github.com/users/hirtie-maxim/orgs","repos_url":"https://api.github.com/users/hirtie-maxim/repos","events_url":"https://api.github.com/users/hirtie-maxim/events{/privacy}","received_events_url":"https://api.github.com/users/hirtie-maxim/received_events","type":"User","site_admin":false},"body":" [``* `#18939` Date picker inplace editor``](http://community.openproject.org/work_packages/18939)","created_at":"2015-03-05T10:23:34Z","updated_at":"2015-03-09T11:46:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdab6a7338890b143fb6cb57c6e8da3d9d7dc957","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opf/openproject/pulls/2662/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/2662/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/2662/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/5922c93d1cf70eec0b83fa05494fe9fd7330414f","head":{"label":"hirtie-maxim:feature/17419_date_picker_in_place_editor","ref":"feature/17419_date_picker_in_place_editor","sha":"5922c93d1cf70eec0b83fa05494fe9fd7330414f","user":{"login":"hirtie-maxim","id":6662687,"avatar_url":"https://avatars.githubusercontent.com/u/6662687?v=3","gravatar_id":"","url":"https://api.github.com/users/hirtie-maxim","html_url":"https://github.com/hirtie-maxim","followers_url":"https://api.github.com/users/hirtie-maxim/followers","following_url":"https://api.github.com/users/hirtie-maxim/following{/other_user}","gists_url":"https://api.github.com/users/hirtie-maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/hirtie-maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirtie-maxim/subscriptions","organizations_url":"https://api.github.com/users/hirtie-maxim/orgs","repos_url":"https://api.github.com/users/hirtie-maxim/repos","events_url":"https://api.github.com/users/hirtie-maxim/events{/privacy}","received_events_url":"https://api.github.com/users/hirtie-maxim/received_events","type":"User","site_admin":false},"repo":{"id":30593650,"name":"openproject","full_name":"hirtie-maxim/openproject","owner":{"login":"hirtie-maxim","id":6662687,"avatar_url":"https://avatars.githubusercontent.com/u/6662687?v=3","gravatar_id":"","url":"https://api.github.com/users/hirtie-maxim","html_url":"https://github.com/hirtie-maxim","followers_url":"https://api.github.com/users/hirtie-maxim/followers","following_url":"https://api.github.com/users/hirtie-maxim/following{/other_user}","gists_url":"https://api.github.com/users/hirtie-maxim/gists{/gist_id}","starred_url":"https://api.github.com/users/hirtie-maxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirtie-maxim/subscriptions","organizations_url":"https://api.github.com/users/hirtie-maxim/orgs","repos_url":"https://api.github.com/users/hirtie-maxim/repos","events_url":"https://api.github.com/users/hirtie-maxim/events{/privacy}","received_events_url":"https://api.github.com/users/hirtie-maxim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hirtie-maxim/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/hirtie-maxim/openproject","forks_url":"https://api.github.com/repos/hirtie-maxim/openproject/forks","keys_url":"https://api.github.com/repos/hirtie-maxim/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hirtie-maxim/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hirtie-maxim/openproject/teams","hooks_url":"https://api.github.com/repos/hirtie-maxim/openproject/hooks","issue_events_url":"https://api.github.com/repos/hirtie-maxim/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/hirtie-maxim/openproject/events","assignees_url":"https://api.github.com/repos/hirtie-maxim/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/hirtie-maxim/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/hirtie-maxim/openproject/tags","blobs_url":"https://api.github.com/repos/hirtie-maxim/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hirtie-maxim/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hirtie-maxim/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/hirtie-maxim/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hirtie-maxim/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/hirtie-maxim/openproject/languages","stargazers_url":"https://api.github.com/repos/hirtie-maxim/openproject/stargazers","contributors_url":"https://api.github.com/repos/hirtie-maxim/openproject/contributors","subscribers_url":"https://api.github.com/repos/hirtie-maxim/openproject/subscribers","subscription_url":"https://api.github.com/repos/hirtie-maxim/openproject/subscription","commits_url":"https://api.github.com/repos/hirtie-maxim/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/hirtie-maxim/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/hirtie-maxim/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/hirtie-maxim/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/hirtie-maxim/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/hirtie-maxim/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hirtie-maxim/openproject/merges","archive_url":"https://api.github.com/repos/hirtie-maxim/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hirtie-maxim/openproject/downloads","issues_url":"https://api.github.com/repos/hirtie-maxim/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/hirtie-maxim/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/hirtie-maxim/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/hirtie-maxim/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hirtie-maxim/openproject/labels{/name}","releases_url":"https://api.github.com/repos/hirtie-maxim/openproject/releases{/id}","created_at":"2015-02-10T13:38:46Z","updated_at":"2015-03-02T12:39:24Z","pushed_at":"2015-03-09T11:46:50Z","git_url":"git://github.com/hirtie-maxim/openproject.git","ssh_url":"git@github.com:hirtie-maxim/openproject.git","clone_url":"https://github.com/hirtie-maxim/openproject.git","svn_url":"https://github.com/hirtie-maxim/openproject","homepage":"https://www.openproject.org","size":61822,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"opf:dev","ref":"dev","sha":"1caadff6d8b90ce6c3b258f3da57bdd27e97c86f","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2015-03-09T11:12:54Z","pushed_at":"2015-03-09T08:26:58Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":186294,"stargazers_count":539,"watchers_count":539,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":237,"mirror_url":null,"open_issues_count":55,"forks":237,"open_issues":55,"watchers":539,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/2662"},"html":{"href":"https://github.com/opf/openproject/pull/2662"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/2662"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/2662/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/2662/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/2662/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/5922c93d1cf70eec0b83fa05494fe9fd7330414f"}}}}