Fix lettuce signup feature to match Drupal site.

This commit is contained in:
Diana Huang
2013-05-16 18:18:04 -04:00
parent acfcd0f8a4
commit dadcdd0599
2 changed files with 8 additions and 7 deletions

View File

@@ -5,12 +5,12 @@ Feature: Sign in
Scenario: Sign up from the homepage
Given I visit the homepage
When I click the link with the text "Sign Up"
When I click the link with the text "Register Now"
And I fill in "email" on the registration form with "robot2@edx.org"
And I fill in "password" on the registration form with "test"
And I fill in "username" on the registration form with "robot2"
And I fill in "name" on the registration form with "Robot Two"
And I check the checkbox named "terms_of_service"
And I check the checkbox named "honor_code"
And I press the "Create My Account" button on the registration form
And I submit the registration form
Then I should see "THANKS FOR REGISTERING!" in the dashboard banner

View File

@@ -3,17 +3,18 @@
from lettuce import world, step
@step('I fill in "([^"]*)" on the registration form with "([^"]*)"$')
def when_i_fill_in_field_on_the_registration_form_with_value(step, field, value):
register_form = world.browser.find_by_css('form#register_form')
register_form = world.browser.find_by_css('form#register-form')
form_field = register_form.find_by_name(field)
form_field.fill(value)
@step('I press the "([^"]*)" button on the registration form$')
def i_press_the_button_on_the_registration_form(step, button):
register_form = world.browser.find_by_css('form#register_form')
register_form.find_by_value(button).click()
@step('I submit the registration form$')
def i_press_the_button_on_the_registration_form(step):
register_form = world.browser.find_by_css('form#register-form')
register_form.find_by_name('submit').click()
@step('I check the checkbox named "([^"]*)"$')