Commit acfcd0f8 by Diana Huang

Fix the login lettuce feature for the new Drupal site.

parent 2b80b358
......@@ -7,7 +7,7 @@ Feature: Login in as a registered user
Given I am an edX user
And I am an unactivated user
And I visit the homepage
When I click the link with the text "Log In"
When I click the link with the text "Log in"
And I submit my credentials on the login form
Then I should see the login error message "This account has not been activated"
......@@ -15,7 +15,7 @@ Feature: Login in as a registered user
Given I am an edX user
And I am an activated user
And I visit the homepage
When I click the link with the text "Log In"
When I click the link with the text "Log in"
And I submit my credentials on the login form
Then I should be on the dashboard page
......@@ -23,5 +23,5 @@ Feature: Login in as a registered user
Given I am logged in
When I click the dropdown arrow
And I click the link with the text "Log Out"
Then I should see a link with the text "Log In"
Then I should see a link with the text "Log in"
And I should see that the path is "/"
......@@ -19,13 +19,13 @@ def i_am_an_activated_user(step):
def i_submit_my_credentials_on_the_login_form(step):
fill_in_the_login_form('email', 'robot@edx.org')
fill_in_the_login_form('password', 'test')
login_form = world.browser.find_by_css('form#login_form')
login_form.find_by_value('Access My Courses').click()
login_form = world.browser.find_by_css('form#login-form')
login_form.find_by_name('submit').click()
@step(u'I should see the login error message "([^"]*)"$')
def i_should_see_the_login_error_message(step, msg):
login_error_div = world.browser.find_by_css('form#login_form #login_error')
login_error_div = world.browser.find_by_css('.submission-error.is-shown')
assert (msg in login_error_div.text)
......@@ -49,6 +49,6 @@ def user_is_an_activated_user(uname):
def fill_in_the_login_form(field, value):
login_form = world.browser.find_by_css('form#login_form')
login_form = world.browser.find_by_css('form#login-form')
form_field = login_form.find_by_name(field)
form_field.fill(value)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment