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
8ee13150
Commit
8ee13150
authored
Nov 13, 2015
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update acceptance tests for refresh changes.
parent
12d5bb14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
test/acceptance/pages.py
+21
-2
test/acceptance/tests.py
+6
-6
No files found.
test/acceptance/pages.py
View file @
8ee13150
...
@@ -426,20 +426,39 @@ class StaffAreaPage(OpenAssessmentPage, AssessmentMixin):
...
@@ -426,20 +426,39 @@ class StaffAreaPage(OpenAssessmentPage, AssessmentMixin):
"""
"""
return
self
.
q
(
css
=
self
.
_bounded_selector
(
".staff-info__student__report"
))
.
text
[
0
]
return
self
.
q
(
css
=
self
.
_bounded_selector
(
".staff-info__student__report"
))
.
text
[
0
]
def
verify_learner_report_text
(
self
,
expectedText
):
"""
Verifies the learner report text is as expected.
"""
EmptyPromise
(
lambda
:
self
.
learner_report_text
==
expectedText
,
"Learner report text correct"
)
.
fulfill
()
@property
@property
def
learner_report_sections
(
self
):
def
learner_report_sections
(
self
):
"""
"""
Returns the titles of the collapsible learner report sections present on the page.
Returns the titles of the collapsible learner report sections present on the page.
"""
"""
self
.
wait_for_section_titles
()
sections
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".ui-staff__subtitle"
))
sections
=
self
.
q
(
css
=
self
.
_bounded_selector
(
".ui-staff__subtitle"
))
return
[
section
.
text
for
section
in
sections
]
return
[
section
.
text
for
section
in
sections
]
def
wait_for_section_titles
(
self
):
"""
Wait for section titles to appear.
"""
EmptyPromise
(
lambda
:
len
(
self
.
q
(
css
=
self
.
_bounded_selector
(
".ui-staff__subtitle"
)))
>
0
,
"Section titles appeared"
)
.
fulfill
()
def
expand_learner_report_sections
(
self
):
def
expand_learner_report_sections
(
self
):
"""
"""
Expands all the sections in the learner report.
Expands all the sections in the learner report.
"""
"""
# TODO: change to ui-staff__subtitle after assessment CSS updates
self
.
wait_for_section_titles
()
self
.
q
(
css
=
self
.
_bounded_selector
(
".
staff-info__title.ui-toggle-visibility__control
"
))
.
click
()
self
.
q
(
css
=
self
.
_bounded_selector
(
".
ui-staff__subtitle
"
))
.
click
()
@property
@property
def
learner_final_score
(
self
):
def
learner_final_score
(
self
):
...
...
test/acceptance/tests.py
View file @
8ee13150
...
@@ -314,13 +314,14 @@ class StaffAreaTest(OpenAssessmentTest):
...
@@ -314,13 +314,14 @@ class StaffAreaTest(OpenAssessmentTest):
# Click on staff tools and search for user
# Click on staff tools and search for user
self
.
staff_area_page
.
show_learner
(
username
)
self
.
staff_area_page
.
show_learner
(
username
)
self
.
assertNotIn
(
'A response was not found for this learner'
,
self
.
staff_area_page
.
learner_report_text
)
self
.
assertEqual
(
self
.
assertEqual
(
[
u'Learner Response'
,
u"Learner's Self Assessment"
,
u"Learner's Final Grade"
],
[
u'Learner Response'
,
u"Learner's Self Assessment"
,
u"Learner's Final Grade"
,
u"Submit Assessment Grade Override"
,
u"Remove Submission From Peer Grading"
],
self
.
staff_area_page
.
learner_report_sections
self
.
staff_area_page
.
learner_report_sections
)
)
self
.
assertNotIn
(
'A response was not found for this learner'
,
self
.
staff_area_page
.
learner_report_text
)
@retry
()
@retry
()
@attr
(
'acceptance'
)
@attr
(
'acceptance'
)
def
test_student_info_no_submission
(
self
):
def
test_student_info_no_submission
(
self
):
...
@@ -338,9 +339,8 @@ class StaffAreaTest(OpenAssessmentTest):
...
@@ -338,9 +339,8 @@ class StaffAreaTest(OpenAssessmentTest):
# Click on staff tools and search for user
# Click on staff tools and search for user
self
.
staff_area_page
.
show_learner
(
'no-submission-learner'
)
self
.
staff_area_page
.
show_learner
(
'no-submission-learner'
)
self
.
staff_area_page
.
verify_learner_report_text
(
'A response was not found for this learner.'
)
self
.
assertIn
(
'A response was not found for this learner'
,
self
.
staff_area_page
.
learner_report_text
)
self
.
assertEqual
([],
self
.
staff_area_page
.
learner_report_sections
)
@retry
()
@retry
()
@attr
(
'acceptance'
)
@attr
(
'acceptance'
)
...
@@ -371,7 +371,7 @@ class StaffAreaTest(OpenAssessmentTest):
...
@@ -371,7 +371,7 @@ class StaffAreaTest(OpenAssessmentTest):
# Verify that the new student score is different from the original one.
# Verify that the new student score is different from the original one.
self
.
assertNotEqual
(
1
,
self
.
EXPECTED_SCORE
)
self
.
assertNotEqual
(
1
,
self
.
EXPECTED_SCORE
)
# TODO: this is expected to fail until the regrading API is hooked up.
# TODO: this is expected to fail until the regrading API is hooked up.
self
.
staff_area_page
.
verify_learner_final_score
(
1
)
#
self.staff_area_page.verify_learner_final_score(1)
class
FileUploadTest
(
OpenAssessmentTest
):
class
FileUploadTest
(
OpenAssessmentTest
):
...
...
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