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
a042cbc7
Commit
a042cbc7
authored
Jan 29, 2016
by
Attiya Ishaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resetting password shows empty page.
TNL-3573
parent
c51bcdbf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
2 deletions
+44
-2
common/test/acceptance/pages/lms/login_and_register.py
+20
-0
common/test/acceptance/tests/lms/test_lms.py
+22
-0
lms/static/js/student_account/views/AccessView.js
+2
-2
No files found.
common/test/acceptance/pages/lms/login_and_register.py
View file @
a042cbc7
...
@@ -86,6 +86,26 @@ class ResetPasswordPage(PageObject):
...
@@ -86,6 +86,26 @@ class ResetPasswordPage(PageObject):
self
.
q
(
css
=
"#password-reset-form"
)
.
visible
self
.
q
(
css
=
"#password-reset-form"
)
.
visible
)
)
def
fill_password_reset_form
(
self
,
email
):
"""
Fill in the form and submit it
"""
self
.
wait_for_element_visibility
(
'#password-reset-email'
,
'Reset Email field is shown'
)
self
.
q
(
css
=
"#password-reset-email"
)
.
fill
(
email
)
self
.
q
(
css
=
"button.js-reset"
)
.
click
()
def
is_success_visible
(
self
,
selector
):
"""
Check element is visible
"""
self
.
wait_for_element_visibility
(
selector
,
'Success div is shown'
)
def
get_success_message
(
self
):
"""
Return a success message displayed to the user
"""
return
self
.
q
(
css
=
".submission-success h4"
)
.
text
class
CombinedLoginAndRegisterPage
(
PageObject
):
class
CombinedLoginAndRegisterPage
(
PageObject
):
"""Interact with combined login and registration page.
"""Interact with combined login and registration page.
...
...
common/test/acceptance/tests/lms/test_lms.py
View file @
a042cbc7
...
@@ -51,8 +51,18 @@ class ForgotPasswordPageTest(UniqueCourseTest):
...
@@ -51,8 +51,18 @@ class ForgotPasswordPageTest(UniqueCourseTest):
def
setUp
(
self
):
def
setUp
(
self
):
""" Initialize the page object """
""" Initialize the page object """
super
(
ForgotPasswordPageTest
,
self
)
.
setUp
()
super
(
ForgotPasswordPageTest
,
self
)
.
setUp
()
self
.
user_info
=
self
.
_create_user
()
self
.
reset_password_page
=
ResetPasswordPage
(
self
.
browser
)
self
.
reset_password_page
=
ResetPasswordPage
(
self
.
browser
)
def
_create_user
(
self
):
"""
Create a unique user
"""
auto_auth
=
AutoAuthPage
(
self
.
browser
)
.
visit
()
user_info
=
auto_auth
.
user_info
LogoutPage
(
self
.
browser
)
.
visit
()
return
user_info
def
test_reset_password_form_visibility
(
self
):
def
test_reset_password_form_visibility
(
self
):
# Navigate to the password reset page
# Navigate to the password reset page
self
.
reset_password_page
.
visit
()
self
.
reset_password_page
.
visit
()
...
@@ -60,6 +70,18 @@ class ForgotPasswordPageTest(UniqueCourseTest):
...
@@ -60,6 +70,18 @@ class ForgotPasswordPageTest(UniqueCourseTest):
# Expect that reset password form is visible on the page
# Expect that reset password form is visible on the page
self
.
assertTrue
(
self
.
reset_password_page
.
is_form_visible
())
self
.
assertTrue
(
self
.
reset_password_page
.
is_form_visible
())
def
test_reset_password_confirmation_box_visibility
(
self
):
# Navigate to the password reset page
self
.
reset_password_page
.
visit
()
# Navigate to the password reset form and try to submit it
self
.
reset_password_page
.
fill_password_reset_form
(
self
.
user_info
[
'email'
])
self
.
reset_password_page
.
is_success_visible
(
".submission-success"
)
# Expect that we're shown a success message
self
.
assertIn
(
"Password Reset Email Sent"
,
self
.
reset_password_page
.
get_success_message
())
@attr
(
'shard_8'
)
@attr
(
'shard_8'
)
class
LoginFromCombinedPageTest
(
UniqueCourseTest
):
class
LoginFromCombinedPageTest
(
UniqueCourseTest
):
...
...
lms/static/js/student_account/views/AccessView.js
View file @
a042cbc7
...
@@ -102,9 +102,9 @@
...
@@ -102,9 +102,9 @@
//get & check current url hash part & load form accordingly
//get & check current url hash part & load form accordingly
if
(
Backbone
.
history
.
getHash
()
===
'forgot-password-modal'
)
{
if
(
Backbone
.
history
.
getHash
()
===
'forgot-password-modal'
)
{
this
.
resetPassword
();
this
.
resetPassword
();
}
else
{
this
.
loadForm
(
this
.
activeForm
);
}
}
this
.
loadForm
(
this
.
activeForm
);
},
},
loadForm
:
function
(
type
)
{
loadForm
:
function
(
type
)
{
...
...
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