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
8bd09d40
Commit
8bd09d40
authored
Apr 16, 2015
by
Awais Jibran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgot password model not visible when user clicks 'Forgot Password' link on CMS.
TNL-1921
parent
75d37591
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
5 deletions
+56
-5
common/test/acceptance/pages/lms/login_and_register.py
+24
-0
common/test/acceptance/tests/lms/test_lms.py
+21
-1
lms/static/js/spec/student_account/access_spec.js
+5
-2
lms/static/js/student_account/views/AccessView.js
+6
-2
No files found.
common/test/acceptance/pages/lms/login_and_register.py
View file @
8bd09d40
...
@@ -63,6 +63,30 @@ class RegisterPage(PageObject):
...
@@ -63,6 +63,30 @@ class RegisterPage(PageObject):
return
dashboard
return
dashboard
class
ResetPasswordPage
(
PageObject
):
"""Initialize the page.
Arguments:
browser (Browser): The browser instance.
"""
url
=
BASE_URL
+
"/login#forgot-password-modal"
def
__init__
(
self
,
browser
):
super
(
ResetPasswordPage
,
self
)
.
__init__
(
browser
)
def
is_browser_on_page
(
self
):
return
(
self
.
q
(
css
=
"#login-anchor"
)
.
is_present
()
and
self
.
q
(
css
=
"#password-reset-anchor"
)
.
is_present
()
)
def
is_form_visible
(
self
):
return
(
not
self
.
q
(
css
=
"#login-anchor"
)
.
visible
and
self
.
q
(
css
=
"#password-reset-form"
)
.
visible
)
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 @
8bd09d40
...
@@ -30,7 +30,7 @@ from ...pages.lms.problem import ProblemPage
...
@@ -30,7 +30,7 @@ from ...pages.lms.problem import ProblemPage
from
...pages.lms.video.video
import
VideoPage
from
...pages.lms.video.video
import
VideoPage
from
...pages.lms.courseware
import
CoursewarePage
from
...pages.lms.courseware
import
CoursewarePage
from
...pages.studio.settings
import
SettingsPage
from
...pages.studio.settings
import
SettingsPage
from
...pages.lms.login_and_register
import
CombinedLoginAndRegisterPage
from
...pages.lms.login_and_register
import
CombinedLoginAndRegisterPage
,
ResetPasswordPage
from
...pages.lms.track_selection
import
TrackSelectionPage
from
...pages.lms.track_selection
import
TrackSelectionPage
from
...pages.lms.pay_and_verify
import
PaymentAndVerificationFlow
,
FakePaymentPage
from
...pages.lms.pay_and_verify
import
PaymentAndVerificationFlow
,
FakePaymentPage
from
...pages.lms.course_wiki
import
CourseWikiPage
,
CourseWikiEditPage
from
...pages.lms.course_wiki
import
CourseWikiPage
,
CourseWikiEditPage
...
@@ -38,6 +38,26 @@ from ...fixtures.course import CourseFixture, XBlockFixtureDesc, CourseUpdateDes
...
@@ -38,6 +38,26 @@ from ...fixtures.course import CourseFixture, XBlockFixtureDesc, CourseUpdateDes
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
ForgotPasswordPageTest
(
UniqueCourseTest
):
"""
Test that forgot password forms is rendered if url contains 'forgot-password-modal'
in hash.
"""
def
setUp
(
self
):
""" Initialize the page object """
super
(
ForgotPasswordPageTest
,
self
)
.
setUp
()
self
.
reset_password_page
=
ResetPasswordPage
(
self
.
browser
)
def
test_reset_password_form_visibility
(
self
):
# Navigate to the password reset page
self
.
reset_password_page
.
visit
()
# Expect that reset password form is visible on the page
self
.
assertTrue
(
self
.
reset_password_page
.
is_form_visible
())
@attr
(
'shard_1'
)
class
LoginFromCombinedPageTest
(
UniqueCourseTest
):
class
LoginFromCombinedPageTest
(
UniqueCourseTest
):
"""Test that we can log in using the combined login/registration page.
"""Test that we can log in using the combined login/registration page.
...
...
lms/static/js/spec/student_account/access_spec.js
View file @
8bd09d40
...
@@ -149,8 +149,11 @@ define([
...
@@ -149,8 +149,11 @@ define([
// Simulate a click on the reset password link
// Simulate a click on the reset password link
view
.
resetPassword
();
view
.
resetPassword
();
// Verify that the password reset wrapper is populated
// Verify that the login-anchor is hidden
expect
(
$
(
'#password-reset-wrapper'
)).
not
.
toBeEmpty
();
expect
(
$
(
"#login-anchor"
)).
toHaveClass
(
'hidden'
);
// Verify that the password reset form is not hidden
expect
(
$
(
"#password-reset-form"
)).
not
.
toHaveClass
(
'hidden'
);
});
});
it
(
'enrolls the user on auth complete'
,
function
()
{
it
(
'enrolls the user on auth complete'
,
function
()
{
...
...
lms/static/js/student_account/views/AccessView.js
View file @
8bd09d40
...
@@ -82,8 +82,12 @@ var edx = edx || {};
...
@@ -82,8 +82,12 @@ var edx = edx || {};
},
},
postRender
:
function
()
{
postRender
:
function
()
{
// Load the default form
//get & check current url hash part & load form accordingly
this
.
loadForm
(
this
.
activeForm
);
if
(
Backbone
.
history
.
getHash
()
===
"forgot-password-modal"
)
{
this
.
resetPassword
();
}
else
{
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