Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webapp/webapp/features
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/webapp/features')
-rw-r--r--webapp/webapp/features/cannot_modify_poll_structure.feature12
-rw-r--r--webapp/webapp/features/terrain.py4
2 files changed, 15 insertions, 1 deletions
diff --git a/webapp/webapp/features/cannot_modify_poll_structure.feature b/webapp/webapp/features/cannot_modify_poll_structure.feature
new file mode 100644
index 0000000..a424bdd
--- /dev/null
+++ b/webapp/webapp/features/cannot_modify_poll_structure.feature
@@ -0,0 +1,12 @@
+Feature: Researcher can't modify poll's structure
+ As a Researcher
+ I want to not be able to modify a poll's structure
+ when a poll has results
+ So that there is no chance to get mixed results from a poll
+
+ Scenario: a poll with results
+ Given I am logged in as "Researcher"
+ And "poll" exists
+ And "poll" has "simple.poll_result"
+ When I visit the "Modificar estructura" page for "poll" poll
+ Then I should see a message that says "No puede modificar"
diff --git a/webapp/webapp/features/terrain.py b/webapp/webapp/features/terrain.py
index 632ac37..ed52bf6 100644
--- a/webapp/webapp/features/terrain.py
+++ b/webapp/webapp/features/terrain.py
@@ -36,9 +36,11 @@ def load_fixture(fixture_name):
@before.each_feature
def before_each_feature(feature):
+ """This is the main lettuce hook "@before.each_feature"."""
drop_mongo()
drop_sqlite()
- if feature.name == "Researcher adds images to options":
+ if feature.name in ("Researcher adds images to options",
+ "Researcher can't modify poll's structure"):
load_fixture("generic_researcher")