Show the time when a poll starts and ends
This is consistent with the way we show the duration of a budget and its phases. Since budgets are the section with the most recent changes in the admin area, we're using it as a reference. Note that, unlike budgets (which are shown to finish at the beginning of their ending day), a poll has always been considered to finish at the end of their ending day, so we're showing it this way. We're also solving a minor usability issue. While it's pretty intuitive that a poll starting on a certain date will start at the beginning of the day, a poll ending on a certain date isn't clear about when it finishes exactly: is it at the beginning of the day, or at the end of the day? So now we're making this point clear.
This commit is contained in:
@@ -67,8 +67,8 @@ describe "Admin polls", :admin do
|
||||
|
||||
expect(page).to have_content "Poll created successfully"
|
||||
expect(page).to have_content "Upcoming poll"
|
||||
expect(page).to have_content I18n.l(start_date)
|
||||
expect(page).to have_content I18n.l(end_date)
|
||||
expect(page).to have_content "#{I18n.l(start_date)} 00:00"
|
||||
expect(page).to have_content "#{I18n.l(end_date)} 23:59"
|
||||
|
||||
visit poll_path(id: "upcoming-poll")
|
||||
|
||||
@@ -93,7 +93,7 @@ describe "Admin polls", :admin do
|
||||
|
||||
expect(page).to have_content "Poll updated successfully"
|
||||
expect(page).to have_content "Next Poll"
|
||||
expect(page).to have_content I18n.l(end_date.to_date)
|
||||
expect(page).to have_content "#{I18n.l(end_date)} 23:59"
|
||||
end
|
||||
|
||||
scenario "Edit from index" do
|
||||
|
||||
Reference in New Issue
Block a user