From d17143ecf015b74b8a97d8a291a999954823e2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Thu, 24 Feb 2011 09:42:31 +0100 Subject: [PATCH] 5-minute steps in the time selection. #2669 --- app/views/meetings/_form.html.erb | 2 +- features/meetings_new.feature | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/views/meetings/_form.html.erb b/app/views/meetings/_form.html.erb index de73dd463b..fb71f32691 100644 --- a/app/views/meetings/_form.html.erb +++ b/app/views/meetings/_form.html.erb @@ -3,7 +3,7 @@

<%= f.text_field :title, :required => true, :size => 60 %>

<%= f.text_field :location, :size => 60 %>

-

<%= f.text_field :start_date, :required => true, :size => 10 %><%= calendar_for('meeting_start_date') %> <%= time_select("meeting", "start_time", :ignore_date => true) %>

+

<%= f.text_field :start_date, :required => true, :size => 10 %><%= calendar_for('meeting_start_date') %> <%= time_select "meeting", "start_time", :ignore_date => true, :minute_step => 5 %>

<%= text_field_tag "meeting[duration]", @meeting.duration, :size => 5 %> (<%=l :text_in_hours %>)

diff --git a/features/meetings_new.feature b/features/meetings_new.feature index 970430156f..95cb532139 100644 --- a/features/meetings_new.feature +++ b/features/meetings_new.feature @@ -55,4 +55,21 @@ Feature: Create new meetings And I click on "Create" Then I should see "Successful creation." And I should see "FSR Sitzung 123" - # TODO sollten hier noch die "Defaults" abgefragt werden? Wahrscheinlich eher eine RSpec Sache? \ No newline at end of file + # TODO sollten hier noch die "Defaults" abgefragt werden? Wahrscheinlich eher eine RSpec Sache? + + @javascript + Scenario: The start-time should be selectable in 5-minute increments + Given the role "user" may have the following rights: + | view_meetings | + | create_meetings | + When I login as "alice" + And I go to the Meetings page for the project called "dingens" + And I click on "New Meeting" + Then I should see "New Meeting" + And I should not see "01" within "#meeting_start_time_5i" + And I should not see "14" within "#meeting_start_time_5i" + # TODO entweder ich habe einen Knick in der Optik, oder die beiden sollten klappen, geht aber auch mit den 2 nächsten Zeilen... + #And "00" should be selectable from "meeting_start_time_5i" + #And "05" should be selectable from "meeting_start_time_5i" + And I should see "00" within "#meeting_start_time_5i" + And I should see "05" within "#meeting_start_time_5i" \ No newline at end of file