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
0f02744c
Commit
0f02744c
authored
Oct 14, 2015
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve acceptance test code for visiting the learner profile page.
parent
d367f7ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
common/test/acceptance/pages/lms/learner_profile.py
+1
-1
common/test/acceptance/tests/lms/test_learner_profile.py
+10
-3
No files found.
common/test/acceptance/pages/lms/learner_profile.py
View file @
0f02744c
...
...
@@ -43,7 +43,7 @@ class LearnerProfilePage(FieldsMixin, PageObject):
"""
Check if browser is showing correct page.
"""
return
'Learner Profile'
in
self
.
browser
.
title
return
self
.
q
(
css
=
'body.view-profile'
)
.
present
@property
def
privacy
(
self
):
...
...
common/test/acceptance/tests/lms/test_learner_profile.py
View file @
0f02744c
...
...
@@ -51,7 +51,8 @@ class LearnerProfileTestMixin(EventsTestMixin):
def
visit_profile_page
(
self
,
username
,
privacy
=
None
):
"""
Visits a user's profile page.
Visit a user's profile page and if a privacy is specified and
is different from the displayed value, then set the privacy to that value.
"""
profile_page
=
LearnerProfilePage
(
self
.
browser
,
username
)
...
...
@@ -59,9 +60,16 @@ class LearnerProfileTestMixin(EventsTestMixin):
# changing the drop down
if
privacy
is
not
None
:
profile_page
.
visit
()
profile_page
.
wait_for_page
()
# Change the privacy setting if it is not the desired one already
profile_page
.
privacy
=
privacy
# Verify the current setting is as expected
if
privacy
==
self
.
PRIVACY_PUBLIC
:
self
.
assertEqual
(
profile_page
.
privacy
,
'all_users'
)
else
:
self
.
assertEqual
(
profile_page
.
privacy
,
'private'
)
if
privacy
==
self
.
PRIVACY_PUBLIC
:
self
.
set_public_profile_fields_data
(
profile_page
)
...
...
@@ -71,7 +79,6 @@ class LearnerProfileTestMixin(EventsTestMixin):
# Load the page
profile_page
.
visit
()
profile_page
.
wait_for_page
()
return
profile_page
...
...
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