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
f4799f98
Commit
f4799f98
authored
Aug 09, 2013
by
Jonah Stanley
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #630 from edx/jonahstanley/fix-courseteam-tests
Jonahstanley/fix courseteam tests
parents
53bda391
0595459c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
cms/djangoapps/contentstore/features/common.py
+4
-3
cms/djangoapps/contentstore/features/course-team.feature
+1
-1
cms/djangoapps/contentstore/features/course-team.py
+19
-3
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
f4799f98
...
...
@@ -146,12 +146,13 @@ def fill_in_course_info(
def
log_into_studio
(
uname
=
'robot'
,
email
=
'robot+studio@edx.org'
,
password
=
'test'
):
password
=
'test'
,
name
=
'Robot Studio'
):
world
.
log_in
(
username
=
uname
,
password
=
password
,
email
=
email
,
name
=
'Robot Studio'
)
world
.
log_in
(
username
=
uname
,
password
=
password
,
email
=
email
,
name
=
name
)
# Navigate to the studio dashboard
world
.
visit
(
'/'
)
world
.
wait_for
(
lambda
_driver
:
uname
in
world
.
css_find
(
'h2.title'
)[
0
]
.
text
)
def
create_a_course
():
course
=
world
.
CourseFactory
.
create
(
org
=
'MITx'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
...
...
cms/djangoapps/contentstore/features/course-team.feature
View file @
f4799f98
...
...
@@ -71,7 +71,7 @@ Feature: Course Team
And
she selects the new course
And
she views the course team settings
And
she deletes me from the course team
And
I
log in
And
I
am logged into studio
Then
I do not see the course on my page
Scenario
:
Admins should be able to remove their own admin rights
...
...
cms/djangoapps/contentstore/features/course-team.py
View file @
f4799f98
...
...
@@ -2,9 +2,10 @@
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
common
import
create_studio_user
,
log_into_studio
from
common
import
create_studio_user
from
django.contrib.auth.models
import
Group
from
auth.authz
import
get_course_groupname_for_role
from
auth.authz
import
get_course_groupname_for_role
,
get_user_by_email
from
nose.tools
import
assert_true
PASSWORD
=
'test'
EMAIL_EXTENSION
=
'@edx.org'
...
...
@@ -66,6 +67,7 @@ def other_delete_self(_step):
email
=
"robot+studio@edx.org"
)
world
.
css_click
(
to_delete_css
)
# confirm prompt
world
.
wait
(
.
5
)
world
.
css_click
(
".wrapper-prompt-warning .action-primary"
)
...
...
@@ -89,7 +91,21 @@ def remove_course_team_admin(_step, outer_capture, name):
@step
(
u'"([^"]*)" logs in$'
)
def
other_user_login
(
_step
,
name
):
log_into_studio
(
uname
=
name
,
password
=
PASSWORD
,
email
=
name
+
EMAIL_EXTENSION
)
world
.
browser
.
cookies
.
delete
()
world
.
visit
(
'/'
)
signin_css
=
'a.action-signin'
world
.
is_css_present
(
signin_css
)
world
.
css_click
(
signin_css
)
def
fill_login_form
():
login_form
=
world
.
browser
.
find_by_css
(
'form#login_form'
)
login_form
.
find_by_name
(
'email'
)
.
fill
(
name
+
EMAIL_EXTENSION
)
login_form
.
find_by_name
(
'password'
)
.
fill
(
PASSWORD
)
login_form
.
find_by_name
(
'submit'
)
.
click
()
world
.
retry_on_exception
(
fill_login_form
)
assert_true
(
world
.
is_css_present
(
'.new-course-button'
))
world
.
scenario_dict
[
'USER'
]
=
get_user_by_email
(
name
+
EMAIL_EXTENSION
)
@step
(
u'I( do not)? see the course on my 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