Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRogelio Mita <rogeliomita@activitycentral.com>2013-09-11 02:01:17 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-09-11 02:01:17 (GMT)
commitc50fe4cdfd497473aeef647fc028cbcdeb7933a8 (patch)
tree24ecbfa182d5fdeb48f1ad720ad54881beeb3bcc
parent1b7342c0d6ce508c6d75e6a541d629b54627bffc (diff)
Step to match with title and content of popover: see_popover_with_title_and_content
-rw-r--r--webapp/webapp/features/dependencies_information_for_opt_id.feature2
-rw-r--r--webapp/webapp/features/dependencies_information_for_opt_id.py12
2 files changed, 10 insertions, 4 deletions
diff --git a/webapp/webapp/features/dependencies_information_for_opt_id.feature b/webapp/webapp/features/dependencies_information_for_opt_id.feature
index 63bcc75..455bc0d 100644
--- a/webapp/webapp/features/dependencies_information_for_opt_id.feature
+++ b/webapp/webapp/features/dependencies_information_for_opt_id.feature
@@ -5,4 +5,4 @@ Feature: A researcher sees dependencies information for each option ID
And poll in fixture: "poll_with_dependency_rules"
When I visit the "Modificar estructura" page for "3824" poll
And I click in "1378749492016" dependency id
- Then I should see a popover \ No newline at end of file
+ Then I should see popover with title "pregunta 1" and content "niƱo" \ No newline at end of file
diff --git a/webapp/webapp/features/dependencies_information_for_opt_id.py b/webapp/webapp/features/dependencies_information_for_opt_id.py
index 7b1de23..7721710 100644
--- a/webapp/webapp/features/dependencies_information_for_opt_id.py
+++ b/webapp/webapp/features/dependencies_information_for_opt_id.py
@@ -4,7 +4,7 @@ import os
from lettuce import step, world
from fabric.api import local
from django.conf import settings
-from nose.tools import assert_true
+from nose.tools import assert_true, assert_equal
@step(u'And poll in fixture: "([^"]*)"')
@@ -32,7 +32,13 @@ def and_i_click_in_dependency_id(step, dependency_id):
b.find_by_value(dependency_id).click()
-@step(u'Then I should see a popover')
-def see_a_popover(step):
+@step(u'Then I should see popover with title "([^"]*)" and content "([^"]*)"')
+def see_popover_with_title_and_content(step, popover_title, popover_content):
b = world.browser
assert_true(b.is_element_present_by_css('.popover'))
+
+ popover_title_element = b.find_by_css('.popover .popover-title')
+ assert_equal(popover_title, popover_title_element.text)
+
+ popover_title_content = b.find_by_css('.popover .popover-content')
+ assert_equal(popover_content, popover_title_content.text)