Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
d10be681
Commit
d10be681
authored
May 28, 2017
by
rabia23
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bokchoy test
parent
bdd5c563
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
7 deletions
+49
-7
common/test/acceptance/pages/lms/instructor_dashboard.py
+7
-0
common/test/acceptance/tests/lms/test_certificate_web_view.py
+42
-7
No files found.
common/test/acceptance/pages/lms/instructor_dashboard.py
View file @
d10be681
...
...
@@ -1415,6 +1415,13 @@ class CertificatesPage(PageObject):
self
.
get_selector
(
'#invalidate-certificate'
)
.
click
()
@property
def
self_generation_certificate_enabled_button
(
self
):
"""
Returns the "Self Generation Certificate Enable" button.
"""
return
self
.
get_selector
(
'#enable-certificates-submit'
)
@property
def
generate_certificates_button
(
self
):
"""
Returns the "Generate Certificates" button.
...
...
common/test/acceptance/tests/lms/test_certificate_web_view.py
View file @
d10be681
"""
Acceptance tests for the certificate web view feature.
"""
from
common.test.acceptance.tests.helpers
import
(
UniqueCourseTest
,
EventsTestMixin
,
load_data_str
,
get_element_padding
,
get_modal_alert
,
)
from
nose.plugins.attrib
import
attr
from
common.test.acceptance.fixtures.certificates
import
CertificateConfigFixture
from
common.test.acceptance.fixtures.course
import
CourseFixture
,
CourseUpdateDesc
,
XBlockFixtureDesc
from
common.test.acceptance.pages.lms.auto_auth
import
AutoAuthPage
...
...
@@ -13,8 +19,8 @@ from common.test.acceptance.pages.lms.courseware import CoursewarePage
from
common.test.acceptance.pages.lms.progress
import
ProgressPage
from
common.test.acceptance.pages.lms.tab_nav
import
TabNavPage
from
common.test.acceptance.pages.lms.instructor_dashboard
import
InstructorDashboardPage
from
common.test.acceptance.tests.helpers
import
EventsTestMixin
,
UniqueCourseTest
,
get_element_padding
,
load_data_str
from
common.test.acceptance.tests.helpers
import
disable_animations
from
common.test.acceptance.pages.common.logout
import
LogoutPage
@attr
(
shard
=
5
)
...
...
@@ -172,8 +178,20 @@ class CertificateProgressPageTest(UniqueCourseTest):
username
=
"testprogress"
,
email
=
"progress@example.com"
,
password
=
"testuser"
,
course_id
=
self
.
course_id
)
.
visit
()
def
log_in_as_staff
(
self
):
"""
Log in as a staff.
"""
AutoAuthPage
(
self
.
browser
,
username
=
"teststaff"
,
email
=
"test_staff@example.com"
,
password
=
"teststaff"
,
course_id
=
self
.
course_id
,
staff
=
True
,
staff
=
True
)
.
visit
()
def
test_progress_page_has_view_certificate_button
(
self
):
...
...
@@ -190,8 +208,10 @@ class CertificateProgressPageTest(UniqueCourseTest):
And their should be no padding around Certificate info box.
"""
self
.
cert_fixture
.
install
()
self
.
log_in_as_unique_user
()
self
.
enable_self_generation_certificates
()
self
.
log_in_as_unique_user
()
self
.
complete_course_problems
()
self
.
course_info_page
.
visit
()
...
...
@@ -250,4 +270,20 @@ class CertificateProgressPageTest(UniqueCourseTest):
# Submit the answer
self
.
courseware_page
.
q
(
css
=
'button.submit'
)
.
click
()
self
.
courseware_page
.
wait_for_ajax
()
\ No newline at end of file
self
.
courseware_page
.
wait_for_ajax
()
def
enable_self_generation_certificates
(
self
):
"""
Enable self-generation certificates for instructor-paced courses.
By default, it is disabled. (EDUCATOR-394)
"""
self
.
log_in_as_staff
()
self
.
instructor_dashboard_page
.
visit
()
self
.
certificates_section
=
self
.
instructor_dashboard_page
.
select_certificates
()
disable_animations
(
self
.
certificates_section
)
self
.
certificates_section
.
self_generation_certificate_enabled_button
.
click
()
alert
=
get_modal_alert
(
self
.
certificates_section
.
browser
)
alert
.
accept
()
self
.
certificates_section
.
wait_for_ajax
()
LogoutPage
(
self
.
browser
)
.
visit
()
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