diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index 32d591b5df..acccdfe6ca 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -9,8 +9,6 @@ import random import os TEST_ROOT = settings.COMMON_TEST_DATA_ROOT -HTTP_PREFIX = "http://localhost:%s" % settings.LETTUCE_SERVER_PORT - @step(u'I go to the files and uploads page') def go_to_uploads(_step): @@ -109,6 +107,8 @@ def get_file(file_name): index = get_index(file_name) assert index != -1 - url_css = 'input.embeddable-xml-input' - url = world.css_find(url_css)[index].value - return requests.get(HTTP_PREFIX + url) + url_css = 'a.filename' + def get_url(): + return world.css_find(url_css)[index]._element.get_attribute('href') + url = world.retry_on_exception(get_url) + return requests.get(url) diff --git a/docs/internal/testing.md b/docs/internal/testing.md index b060336d1d..9a2a5a0a8f 100644 --- a/docs/internal/testing.md +++ b/docs/internal/testing.md @@ -196,7 +196,11 @@ To run all the acceptance tests: To test only a specific feature: - rake test_acceptance_lms[lms/djangoapps/courseware/features/problems.feature] + rake test_acceptance_lms["lms/djangoapps/courseware/features/problems.feature"] + +To test only a specific scenario + + rake test_acceptance_lms["lms/djangoapps/courseware/features/problems.feature -s 3"] To start the debugger on failure, add the `--pdb` option: