Commit 768d68bffca5743f2e10f691315140d7e1786cd8

Authored by Rodrigo Souto
2 parents b004dee3 c59ac0a0

Merge branch 'fix_article_date_without_time' into 'master'

Adds time to article's publish date

Adds option to select time for article published date. The default time will be the current time during article creation.

See merge request !943
app/views/cms/_text_fields.html.erb
1 -<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', @article.published_at || DateTime.current, {:max_date => '+0d', :date_format => 'yy-mm-dd'}, {:id => "article_published_at"})) %> 1 +<%= labelled_form_field(_('Publish date'), date_field('article[published_at]', @article.published_at || DateTime.current, {:max_date => '+0d', :time => true}, {:id => "article_published_at"})) %>
features/edit_article.feature
@@ -281,3 +281,16 @@ Feature: edit article @@ -281,3 +281,16 @@ Feature: edit article
281 And I press "Save" 281 And I press "Save"
282 Then I should not see "Language must be choosen" 282 Then I should not see "Language must be choosen"
283 And I should be on /joaosilva/article-in-portuguese 283 And I should be on /joaosilva/article-in-portuguese
  284 +
  285 + @selenium
  286 + Scenario: create an article with time
  287 + Given I am on joaosilva's control panel
  288 + And I follow "Manage Content"
  289 + And I follow "New content"
  290 + When I follow "Text article with visual editor"
  291 + And I fill in "Title" with "My time testing Article"
  292 + And I fill in "Publish date" with "1980-11-15 20:37"
  293 + And I press "Save"
  294 + And I go to /joaosilva/my-time-testing-article
  295 + Then I should see "November 15, 1980 20:37"
  296 +