'Scenario: Login with a valid redirect
Given I have opened a new course in Studio
And I am not logged in
And I visit the url "/course/slashes:MITx+999+Robot_Super_Course"
And I should see that the path is "/signin?next=/course/slashes%3AMITx%2B999%2BRobot_Super_Course"
When I fill in and submit the signin form
Then I should see that the path is "/course/slashes:MITx+999+Robot_Super_Course"'

def test_login_with_valid_redirect(self):

    self.install_course_fixture()
    course_url = self.course_outline_sign_in_redirect_page.url
    self.course_outline_sign_in_redirect_page.visit()
    self.course_outline_sign_in_redirect_page.login(self.user['email'], self.user['password'])
    self.course_outline_page.wait_for_page()
    self.assertEqual(self.browser.current_url, course_url)
