Merge pull request #4591 from edx/benp/fix-attach-file
Fix false positive test in cms acceptance, harden attach_file helper.
This commit is contained in:
@@ -345,6 +345,7 @@ def get_codemirror_value(index=0, find_prefix="$"):
|
||||
def attach_file(filename, sub_path):
|
||||
path = os.path.join(TEST_ROOT, sub_path, filename)
|
||||
world.browser.execute_script("$('input.file-input').css('display', 'block')")
|
||||
assert_true(os.path.exists(path))
|
||||
world.browser.attach_file('file', os.path.abspath(path))
|
||||
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ def click_upload_button(_step):
|
||||
|
||||
@step('I upload a new course image$')
|
||||
def upload_new_course_image(_step):
|
||||
upload_file('image.jpg')
|
||||
upload_file('image.jpg', sub_path="uploads")
|
||||
|
||||
|
||||
@step('I should see the new course image$')
|
||||
|
||||
4
common/test/data/uploads/uk_transcripts.sjson
Normal file
4
common/test/data/uploads/uk_transcripts.sjson
Normal file
@@ -0,0 +1,4 @@
|
||||
0
|
||||
00:00:00,100 --> 00:00:02,000
|
||||
Привіт, edX вітає вас.
|
||||
|
||||
Reference in New Issue
Block a user