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
ead87d1f
Commit
ead87d1f
authored
Aug 07, 2013
by
Jonah Stanley
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #602 from edx/jonahstanley/fix-acceptance-template
Changed css_selector
parents
2191a111
ed620e63
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
cms/djangoapps/contentstore/features/common.py
+3
-6
cms/djangoapps/contentstore/features/course-overview.py
+1
-1
cms/djangoapps/contentstore/features/course-team.py
+3
-1
cms/djangoapps/contentstore/features/courses.py
+2
-2
cms/djangoapps/contentstore/features/upload.py
+5
-5
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
ead87d1f
...
...
@@ -56,10 +56,8 @@ def i_have_opened_a_new_course(_step):
@step
(
'(I select|s?he selects) the new course'
)
def
select_new_course
(
_step
,
whom
):
course_link_xpath
=
'//div[contains(@class, "courses")]//a[contains(@class, "class-link")]//span[contains(., "{name}")]/..'
.
format
(
name
=
"Robot Super Course"
)
element
=
world
.
browser
.
find_by_xpath
(
course_link_xpath
)
element
.
click
()
course_link_css
=
'a.course-link'
world
.
css_click
(
course_link_css
)
@step
(
u'I press the "([^"]*)" notification button$'
)
...
...
@@ -179,8 +177,7 @@ def create_a_course():
user
.
groups
.
add
(
group
)
user
.
save
()
world
.
browser
.
reload
()
course_link_css
=
'span.class-name'
course_link_css
=
'a.course-link'
world
.
css_click
(
course_link_css
)
course_title_css
=
'span.course-title'
assert_true
(
world
.
is_css_present
(
course_title_css
))
...
...
cms/djangoapps/contentstore/features/course-overview.py
View file @
ead87d1f
...
...
@@ -52,7 +52,7 @@ def have_a_course_with_two_sections(step):
def
navigate_to_the_course_overview_page
(
step
):
create_studio_user
(
is_staff
=
True
)
log_into_studio
()
course_locator
=
'
.class-name
'
course_locator
=
'
a.course-link
'
world
.
css_click
(
course_locator
)
...
...
cms/djangoapps/contentstore/features/course-team.py
View file @
ead87d1f
...
...
@@ -55,6 +55,8 @@ def delete_other_user(_step, name):
email
=
"{0}{1}"
.
format
(
name
,
EMAIL_EXTENSION
))
world
.
css_click
(
to_delete_css
)
# confirm prompt
# need to wait for the animation to be done, there isn't a good success condition that won't work both on latest chrome and jenkins
world
.
wait
(
.
5
)
world
.
css_click
(
".wrapper-prompt-warning .action-primary"
)
...
...
@@ -93,7 +95,7 @@ def other_user_login(_step, name):
@step
(
u'I( do not)? see the course on my page'
)
@step
(
u's?he does( not)? see the course on (his|her) page'
)
def
see_course
(
_step
,
inverted
,
gender
=
'self'
):
class_css
=
'
span.class-nam
e'
class_css
=
'
h3.course-titl
e'
all_courses
=
world
.
css_find
(
class_css
,
wait_time
=
1
)
all_names
=
[
item
.
html
for
item
in
all_courses
]
if
inverted
:
...
...
cms/djangoapps/contentstore/features/courses.py
View file @
ead87d1f
...
...
@@ -30,7 +30,7 @@ def i_create_a_course(step):
@step
(
'I click the course link in My Courses$'
)
def
i_click_the_course_link_in_my_courses
(
step
):
course_css
=
'
span.class-name
'
course_css
=
'
a.course-link
'
world
.
css_click
(
course_css
)
############ ASSERTIONS ###################
...
...
@@ -44,7 +44,7 @@ def courseware_page_has_loaded_in_studio(step):
@step
(
'I see the course listed in My Courses$'
)
def
i_see_the_course_in_my_courses
(
step
):
course_css
=
'
span.class-nam
e'
course_css
=
'
h3.class-titl
e'
assert
world
.
css_has_text
(
course_css
,
world
.
scenario_dict
[
'COURSE'
]
.
display_name
)
...
...
cms/djangoapps/contentstore/features/upload.py
View file @
ead87d1f
...
...
@@ -24,13 +24,10 @@ def go_to_uploads(_step):
def
upload_file
(
_step
,
file_name
):
upload_css
=
'a.upload-button'
world
.
css_click
(
upload_css
)
file_css
=
'input.file-input'
upload
=
world
.
css_find
(
file_css
)
#uploading the file itself
path
=
os
.
path
.
join
(
TEST_ROOT
,
'uploads/'
,
file_name
)
upload
.
_element
.
send_keys
(
os
.
path
.
abspath
(
path
)
)
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
world
.
browser
.
attach_file
(
'file'
,
os
.
path
.
abspath
(
path
))
close_css
=
'a.close-button'
world
.
css_click
(
close_css
)
...
...
@@ -80,6 +77,9 @@ def check_download(_step, file_name):
r
=
get_file
(
file_name
)
downloaded_text
=
r
.
text
assert
cur_text
==
downloaded_text
#resetting the file back to its original state
with
open
(
os
.
path
.
abspath
(
path
),
'w'
)
as
cur_file
:
cur_file
.
write
(
"This is an arbitrary file for testing uploads"
)
@step
(
u'I modify "([^"]*)"$'
)
...
...
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