Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
834b9a3a
Commit
834b9a3a
authored
Jul 17, 2015
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add integration test for deleting export results.
parent
36d488c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
problem_builder/tests/integration/test_instructor_tool.py
+30
-0
No files found.
problem_builder/tests/integration/test_instructor_tool.py
View file @
834b9a3a
...
@@ -62,6 +62,36 @@ class InstructorToolTest(SeleniumXBlockTest):
...
@@ -62,6 +62,36 @@ class InstructorToolTest(SeleniumXBlockTest):
'instructor_task.models'
:
MockInstructorTaskModelsModule
(),
'instructor_task.models'
:
MockInstructorTaskModelsModule
(),
})
})
@patch.object
(
InstructorToolBlock
,
'user_is_staff'
,
Mock
(
return_value
=
True
))
@patch.object
(
InstructorToolBlock
,
'user_is_staff'
,
Mock
(
return_value
=
True
))
def
test_data_export_delete
(
self
):
instructor_tool
=
self
.
go_to_view
()
start_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-start'
)
result_block
=
instructor_tool
.
find_element_by_class_name
(
'data-export-results'
)
status_area
=
instructor_tool
.
find_element_by_class_name
(
'data-export-status'
)
download_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-download'
)
cancel_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-cancel'
)
delete_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-delete'
)
start_button
.
click
()
self
.
wait_until_visible
(
result_block
)
self
.
wait_until_visible
(
delete_button
)
delete_button
.
click
()
self
.
wait_until_hidden
(
result_block
)
self
.
wait_until_hidden
(
delete_button
)
self
.
assertTrue
(
start_button
.
is_enabled
())
self
.
assertEqual
(
''
,
status_area
.
text
)
self
.
assertFalse
(
download_button
.
is_displayed
())
self
.
assertFalse
(
cancel_button
.
is_displayed
())
@patch.dict
(
'sys.modules'
,
{
'problem_builder.tasks'
:
MockTasksModule
(
successful
=
True
),
'instructor_task'
:
True
,
'instructor_task.models'
:
MockInstructorTaskModelsModule
(),
})
@patch.object
(
InstructorToolBlock
,
'user_is_staff'
,
Mock
(
return_value
=
True
))
def
test_data_export_success
(
self
):
def
test_data_export_success
(
self
):
instructor_tool
=
self
.
go_to_view
()
instructor_tool
=
self
.
go_to_view
()
start_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-start'
)
start_button
=
instructor_tool
.
find_element_by_class_name
(
'data-export-start'
)
...
...
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