Skip to content

Commit

Permalink
remove exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mondkaefer committed Aug 17, 2012
1 parent 73faaa0 commit 3fabfa6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 67 deletions.
19 changes: 5 additions & 14 deletions features/steps/proposal_collaborator.py
Expand Up @@ -5,15 +5,10 @@

@step('{ADD_PROPOSAL_COLLABORATOR} And set title to (.*)')
def ADD_PROPOSAL_COLLABORATOR_set_title(step, val):
try:
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)
except:
world.browser.save_screenshot('error_screenshot.png')
raise

el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)

@step('{ADD_PROPOSAL_COLLABORATOR} And set description to (.*)')
def ADD_PROPOSAL_COLLABORATOR_set_description(step, description):
Expand All @@ -30,9 +25,5 @@ def ADD_PROPOSAL_COLLABORATOR_save(step):

@step('{ADD_PROPOSAL_COLLABORATOR} Then the proposal has been created and the page contains (.*)')
def ADD_PROPOSAL_COLLABORATOR_verify_creation(step, confirmation):
try:
assert confirmation in world.browser.page_source
except:
world.browser.save_screenshot('error_screenshot.png')
raise
assert confirmation in world.browser.page_source

18 changes: 5 additions & 13 deletions features/steps/proposal_development.py
Expand Up @@ -5,14 +5,10 @@

@step('{ADD_PROPOSAL_DEVELOPMENT} And set title to (.*)')
def ADD_PROPOSAL_DEVELOPMENT_set_title(step, val):
try:
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)
except:
world.browser.save_screenshot('error_screenshot.png')
raise
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)

@step('{ADD_PROPOSAL_DEVELOPMENT} And set description to (.*)')
def ADD_PROPOSAL_DEVELOPMENT_set_description(step, val):
Expand Down Expand Up @@ -116,8 +112,4 @@ def ADD_PROPOSAL_DEVELOPMENT_save(step):

@step('{ADD_PROPOSAL_DEVELOPMENT} Then the proposal has been created and the page contains (.*)')
def ADD_PROPOSAL_DEVELOPMENT_verify_creation(step, confirmation):
try:
assert confirmation in world.browser.page_source
except:
world.browser.save_screenshot('error_screenshot.png')
raise
assert confirmation in world.browser.page_source
18 changes: 5 additions & 13 deletions features/steps/proposal_private_industry.py
Expand Up @@ -5,14 +5,10 @@

@step('{ADD_PROPOSAL_PRIVATE_INDUSTRY} And set title to (.*)')
def ADD_PROPOSAL_PRIVATE_INDUSTRY_set_title(step, val):
try:
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)
except:
world.browser.save_screenshot('error_screenshot.png')
raise
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)

@step('{ADD_PROPOSAL_PRIVATE_INDUSTRY} And set description to (.*)')
def ADD_PROPOSAL_PRIVATE_INDUSTRY_set_description(step, description):
Expand All @@ -29,8 +25,4 @@ def ADD_PROPOSAL_PRIVATE_INDUSTRY_save(step):

@step('{ADD_PROPOSAL_PRIVATE_INDUSTRY} Then the proposal has been created and the page contains (.*)')
def ADD_PROPOSAL_PRIVATE_INDUSTRY_verify_creation(step, confirmation):
try:
assert confirmation in world.browser.page_source
except:
world.browser.save_screenshot('error_screenshot.png')
raise
assert confirmation in world.browser.page_source
18 changes: 5 additions & 13 deletions features/steps/proposal_research.py
Expand Up @@ -5,14 +5,10 @@

@step('{ADD_PROPOSAL_RESEARCH} And set title to (.*)')
def ADD_PROPOSAL_RESEARCH_set_title(step, val):
try:
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)
except:
world.browser.save_screenshot('error_screenshot.png')
raise
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)

@step('{ADD_PROPOSAL_RESEARCH} And set scientific goals to (.*)')
def ADD_PROPOSAL_RESEARCH_set_scientific_goals(step, val):
Expand Down Expand Up @@ -176,8 +172,4 @@ def ADD_PROPOSAL_RESEARCH_save(step):

@step('{ADD_PROPOSAL_RESEARCH} Then the proposal has been created and the page contains (.*)')
def ADD_PROPOSAL_RESEARCH_verify_creation(step, confirmation):
try:
assert confirmation in world.browser.page_source
except:
world.browser.save_screenshot('error_screenshot.png')
raise
assert confirmation in world.browser.page_source
19 changes: 5 additions & 14 deletions features/steps/proposal_teaching.py
Expand Up @@ -5,15 +5,10 @@

@step('{ADD_PROPOSAL_TEACHING} And set title to (.*)')
def ADD_PROPOSAL_TEACHING_set_title(step, val):
try:

el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)
except:
world.browser.save_screenshot('error_screenshot.png')
raise
el = world.browser.find_element_by_id('edit-title')
el.clear()
el.send_keys(val)
sleep(world.delay)

@step('{ADD_PROPOSAL_TEACHING} And set description to (.*)')
def ADD_PROPOSAL_TEACHING_set_description(step, description):
Expand All @@ -30,8 +25,4 @@ def ADD_PROPOSAL_TEACHING_save(step):

@step('{ADD_PROPOSAL_TEACHING} Then the proposal has been created and the page contains (.*)')
def ADD_PROPOSAL_TEACHING_verify_creation(step, confirmation):
try:
assert confirmation in world.browser.page_source
except:
world.browser.save_screenshot('error_screenshot.png')
raise
assert confirmation in world.browser.page_source

0 comments on commit 3fabfa6

Please sign in to comment.