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
34a4b35e
Commit
34a4b35e
authored
Feb 15, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lettuce acceptance tests to reflect the new soft landing page changes.
parent
6c954607
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
18 deletions
+26
-18
cms/djangoapps/contentstore/features/common.py
+13
-6
cms/djangoapps/contentstore/features/courses.py
+2
-2
cms/djangoapps/contentstore/features/signup.feature
+3
-4
cms/djangoapps/contentstore/features/signup.py
+4
-3
lms/djangoapps/courseware/features/courseware_common.py
+2
-2
lms/djangoapps/terrain/browser.py
+2
-1
No files found.
cms/djangoapps/contentstore/features/common.py
View file @
34a4b35e
...
...
@@ -20,7 +20,8 @@ def i_visit_the_studio_homepage(step):
# LETTUCE_SERVER_PORT = 8001
# in your settings.py file.
world
.
browser
.
visit
(
django_url
(
'/'
))
assert
world
.
browser
.
is_element_present_by_css
(
'body.no-header'
,
10
)
signin_css
=
'a.action-signin'
assert
world
.
browser
.
is_element_present_by_css
(
signin_css
,
10
)
@step
(
'I am logged into Studio$'
)
...
...
@@ -113,7 +114,11 @@ def log_into_studio(
create_studio_user
(
uname
=
uname
,
email
=
email
,
is_staff
=
is_staff
)
world
.
browser
.
cookies
.
delete
()
world
.
browser
.
visit
(
django_url
(
'/'
))
world
.
browser
.
is_element_present_by_css
(
'body.no-header'
,
10
)
signin_css
=
'a.action-signin'
world
.
browser
.
is_element_present_by_css
(
signin_css
,
10
)
# click the signin button
css_click
(
signin_css
)
login_form
=
world
.
browser
.
find_by_css
(
'form#login_form'
)
login_form
.
find_by_name
(
'email'
)
.
fill
(
email
)
...
...
@@ -127,17 +132,19 @@ def create_a_course():
css_click
(
'a.new-course-button'
)
fill_in_course_info
()
css_click
(
'input.new-course-save'
)
assert_true
(
world
.
browser
.
is_element_present_by_css
(
'a#courseware-tab'
,
5
))
course_title_css
=
'span.course-title'
assert_true
(
world
.
browser
.
is_element_present_by_css
(
course_title_css
,
5
))
def
add_section
(
name
=
'My Section'
):
link_css
=
'a.new-courseware-section-button'
css_click
(
link_css
)
name_css
=
'.new-section-name'
save_css
=
'.new-section-name-save'
name_css
=
'
input
.new-section-name'
save_css
=
'
input
.new-section-name-save'
css_fill
(
name_css
,
name
)
css_click
(
save_css
)
span_css
=
'span.section-name-span'
assert_true
(
world
.
browser
.
is_element_present_by_css
(
span_css
,
5
))
def
add_subsection
(
name
=
'Subsection One'
):
css
=
'a.new-subsection-item'
...
...
cms/djangoapps/contentstore/features/courses.py
View file @
34a4b35e
...
...
@@ -34,8 +34,8 @@ def i_click_the_course_link_in_my_courses(step):
@step
(
'the Courseware page has loaded in Studio$'
)
def
courseware_page_has_loaded_in_studio
(
step
):
course
ware_css
=
'a#courseware-tab
'
assert
world
.
browser
.
is_element_present_by_css
(
course
war
e_css
)
course
_title_css
=
'span.course-title
'
assert
world
.
browser
.
is_element_present_by_css
(
course
_titl
e_css
)
@step
(
'I see the course listed in My Courses$'
)
...
...
cms/djangoapps/contentstore/features/signup.feature
View file @
34a4b35e
...
...
@@ -5,8 +5,8 @@ Feature: Sign in
Scenario
:
Sign up from the homepage
Given
I visit the Studio homepage
When
I click the link with the text
"Sign
u
p"
When
I click the link with the text
"Sign
U
p"
And
I fill in the registration form
And
I press the
"Create My Account"
button on the registration form
And
I press the
Create My Account
button on the registration form
Then
I should see be on the studio home page
And
I should see the message
"please click on the activation link in your email."
\ No newline at end of file
And
I should see the message
"please click on the activation link in your email."
cms/djangoapps/contentstore/features/signup.py
View file @
34a4b35e
...
...
@@ -11,10 +11,11 @@ def i_fill_in_the_registration_form(step):
register_form
.
find_by_name
(
'terms_of_service'
)
.
check
()
@step
(
'I press the
"([^"]*)"
button on the registration form$'
)
def
i_press_the_button_on_the_registration_form
(
step
,
button
):
@step
(
'I press the
Create My Account
button on the registration form$'
)
def
i_press_the_button_on_the_registration_form
(
step
):
register_form
=
world
.
browser
.
find_by_css
(
'form#register_form'
)
register_form
.
find_by_value
(
button
)
.
click
()
submit_css
=
'button#submit'
register_form
.
find_by_css
(
submit_css
)
.
click
()
@step
(
'I should see be on the studio home page$'
)
...
...
lms/djangoapps/courseware/features/courseware_common.py
View file @
34a4b35e
...
...
@@ -4,13 +4,13 @@ from lettuce.django import django_url
@step
(
'I click on View Courseware'
)
def
i_click_on_view_courseware
(
step
):
css
=
'
p
.enter-course'
css
=
'
a
.enter-course'
world
.
browser
.
find_by_css
(
css
)
.
first
.
click
()
@step
(
'I click on the "([^"]*)" tab$'
)
def
i_click_on_the_tab
(
step
,
tab
):
world
.
browser
.
find_link_by_text
(
tab
)
.
first
.
click
()
world
.
browser
.
find_link_by_
partial_
text
(
tab
)
.
first
.
click
()
world
.
save_the_html
()
...
...
lms/djangoapps/terrain/browser.py
View file @
34a4b35e
...
...
@@ -11,8 +11,9 @@ from django.core.management import call_command
@before.harvest
def
initial_setup
(
server
):
# Launch
firefox
# Launch
the browser app (choose one of these below)
world
.
browser
=
Browser
(
'chrome'
)
# world.browser = Browser('firefox')
@before.each_scenario
...
...
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