aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-21 18:42:07 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-26 12:09:47 +0200
commit1a15725aad91a3b16928cb43f608379d6ade13e3 (patch)
tree1ffb09a673a40c47fae264f517cae57ab5fb658e /site/features
parentAdd summary field (diff)
downloadcouncil-webapp-1a15725aad91a3b16928cb43f608379d6ade13e3.tar.gz
council-webapp-1a15725aad91a3b16928cb43f608379d6ade13e3.tar.bz2
council-webapp-1a15725aad91a3b16928cb43f608379d6ade13e3.zip
Council members can approve summaries
Regular users can view summary only after 4 council members approve it. When someone changes summary all approvals for that summary are deleted.
Diffstat (limited to 'site/features')
-rw-r--r--site/features/meeting_summary_approvals.feature28
-rw-r--r--site/features/step_definitions/meeting_summary_approvals_steps.rb5
-rw-r--r--site/features/step_definitions/within_steps.rb1
3 files changed, 34 insertions, 0 deletions
diff --git a/site/features/meeting_summary_approvals.feature b/site/features/meeting_summary_approvals.feature
new file mode 100644
index 0000000..e49e467
--- /dev/null
+++ b/site/features/meeting_summary_approvals.feature
@@ -0,0 +1,28 @@
+Feature: Meeting summary approvals
+ As council member I want to prepare meeting summaries
+ And I want other council members to approve them
+ So they will become public only when majority of council approves
+
+ Scenario: Write meeting summary
+ Given I am logged in as a council member
+ When I am on the current agenda page
+ And I follow "Edit"
+ And I fill in "agenda[summary]" with "some summary"
+ And I press "Save"
+ Then I should see "some summary" as summary
+
+ Scenario: Approve meeting summary, then remove approval
+ Given I am logged in as a council member
+ When current agenda has a summary
+ And I am on the current agenda page
+ And I press "approve summary"
+ Then I should see "The Approval was created successfully" in the notices
+
+ When I am on the current agenda page
+ Then I should see "Summary for this agenda was approved by 1 council member(s): Example."
+
+ When I press "remove your approval for this summary"
+ And I confirm
+
+ When I am on the current agenda page
+ Then I should not see "Summary for this agenda was approved"
diff --git a/site/features/step_definitions/meeting_summary_approvals_steps.rb b/site/features/step_definitions/meeting_summary_approvals_steps.rb
new file mode 100644
index 0000000..adf1481
--- /dev/null
+++ b/site/features/step_definitions/meeting_summary_approvals_steps.rb
@@ -0,0 +1,5 @@
+When /^current agenda has a summary$/ do
+ agenda = Agenda.current
+ agenda.summary = 'Summary'
+ agenda.save!
+end
diff --git a/site/features/step_definitions/within_steps.rb b/site/features/step_definitions/within_steps.rb
index a36a4af..42f2ff6 100644
--- a/site/features/step_definitions/within_steps.rb
+++ b/site/features/step_definitions/within_steps.rb
@@ -11,6 +11,7 @@
'as meeting time' => '.meeting-time-view',
'as proxy' => '.collection.proxies.proxies-collection',
'as the user nick' => '.user-irc-nick',
+ 'as summary' => '.agenda-summary',
'as voting option' => '.collection.voting-options',
'as voting option description' => '.voting-option-description'
}.