Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
3789d962
Commit
3789d962
authored
May 03, 2017
by
Eric Fischer
Committed by
GitHub
May 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1003 from edx/efischer/fix_tests
Fix file upload tests
parents
cffda376
83a5da46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
test/acceptance/pages.py
+1
-1
test/acceptance/tests.py
+2
-8
No files found.
test/acceptance/pages.py
View file @
3789d962
...
...
@@ -178,7 +178,7 @@ class SubmissionPage(OpenAssessmentPage):
Returns:
bool
"""
return
self
.
q
(
css
=
"button.file__upload"
)
.
attrs
(
'disabled'
)
==
[
'false'
]
return
self
.
q
(
css
=
"button.file__upload"
)
[
0
]
.
is_enabled
()
@property
def
upload_file_button_is_disabled
(
self
):
...
...
test/acceptance/tests.py
View file @
3789d962
...
...
@@ -741,18 +741,12 @@ class FileUploadTest(OpenAssessmentTest):
self
.
assertTrue
(
self
.
submission_page
.
has_file_error
)
# trying to upload a acceptable file
readme1
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
+
'/README.rst'
readme2
=
readme1
.
replace
(
'test/acceptance/'
,
''
)
# There's another README located at ../../
files
=
', '
.
join
([
readme1
,
readme2
])
self
.
submission_page
.
visit
()
.
select_file
(
files
)
readme
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
+
'/README.rst'
self
.
submission_page
.
visit
()
.
select_file
(
readme
)
self
.
assertFalse
(
self
.
submission_page
.
has_file_error
)
self
.
assertTrue
(
self
.
submission_page
.
upload_file_button_is_disabled
)
self
.
submission_page
.
add_file_description
(
0
,
'file description 1'
)
self
.
assertTrue
(
self
.
submission_page
.
upload_file_button_is_disabled
)
self
.
submission_page
.
add_file_description
(
1
,
'file description 2'
)
self
.
assertTrue
(
self
.
submission_page
.
upload_file_button_is_enabled
)
self
.
submission_page
.
upload_file
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment