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
f26e88bd
Commit
f26e88bd
authored
Aug 19, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix messaging for professional ed under auto-registration
parent
a3c2a54b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
lms/djangoapps/verify_student/tests/test_integration.py
+29
-5
lms/templates/verify_student/_verification_header.html
+2
-0
No files found.
lms/djangoapps/verify_student/tests/test_integration.py
View file @
f26e88bd
...
...
@@ -5,18 +5,22 @@ Integration tests of the payment flow, including course mode selection.
from
lxml.html
import
soupparser
from
django.test.utils
import
override_settings
from
django.core.urlresolvers
import
reverse
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
django.conf
import
settings
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
,
mixed_store_config
from
student.tests.factories
import
UserFactory
from
student.models
import
CourseEnrollment
from
course_modes.tests.factories
import
CourseModeFactory
from
courseware.tests.tests
import
TEST_DATA_MONGO_MODULESTORE
from
verify_student.models
import
SoftwareSecurePhotoVerification
@override_settings
(
MODULESTORE
=
TEST_DATA_MONGO_MODULESTORE
)
# Since we don't need any XML course fixtures, use a modulestore configuration
# that disables the XML modulestore.
MODULESTORE_CONFIG
=
mixed_store_config
(
settings
.
COMMON_TEST_DATA_ROOT
,
{},
include_xml
=
False
)
@override_settings
(
MODULESTORE
=
MODULESTORE_CONFIG
)
class
TestProfEdVerification
(
ModuleStoreTestCase
):
"""
Integration test for professional ed verification, including course mode selection.
...
...
@@ -95,6 +99,26 @@ class TestProfEdVerification(ModuleStoreTestCase):
# On the verified page, expect that there's a link to payment page
self
.
assertContains
(
resp
,
'/shoppingcart/payment_fake'
)
def
test_do_not_auto_register
(
self
):
# TODO (ECOM-16): Remove once we complete the AB-test of auto-registration.
session
=
self
.
client
.
session
session
[
'auto_register'
]
=
True
session
.
save
()
# Go to the course mode page, expecting a redirect
# to the show requirements page.
resp
=
self
.
client
.
get
(
self
.
urls
[
'course_modes_choose'
],
follow
=
True
)
self
.
assertRedirects
(
resp
,
self
.
urls
[
'verify_show_student_requirements'
])
# For professional ed courses, expect that the student is NOT enrolled
# automatically in the course.
self
.
assertFalse
(
CourseEnrollment
.
is_enrolled
(
self
.
user
,
self
.
course_key
))
# Expect that the rendered page says that the student is "registering",
# not that they've already been registered.
self
.
assertIn
(
"You are registering for"
,
resp
.
content
)
self
.
assertNotIn
(
"You are now registered"
,
resp
.
content
)
def
_prices_on_page
(
self
,
page_content
):
""" Retrieve the available prices on the verify page. """
html
=
soupparser
.
fromstring
(
page_content
)
...
...
lms/templates/verify_student/_verification_header.html
View file @
f26e88bd
...
...
@@ -46,6 +46,8 @@
<span
class=
"sts-label"
>
${_("You are upgrading your registration for")}
</span>
%elif reverify:
<span
class=
"sts-label"
>
${_("You are re-verifying for")}
</span>
%elif modes_dict and "professional" in modes_dict:
<span
class=
"sts-label"
>
${_("You are registering for")}
</span>
%else:
<span
class=
"sts-label"
>
${_("Congrats! You are now registered to audit")}
</span>
%endif
...
...
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