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
7fe206a9
Commit
7fe206a9
authored
May 30, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sped up some Lettuce Tests
parent
62b74008
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
lms/djangoapps/courseware/features/homepage.feature
+2
-6
lms/djangoapps/courseware/features/homepage.py
+15
-4
No files found.
lms/djangoapps/courseware/features/homepage.feature
View file @
7fe206a9
...
...
@@ -13,9 +13,7 @@ Feature: Homepage for web users
Scenario Outline
:
User can see main parts of the page
Given
I visit the homepage
Then
I should see a link with the id
"<id>"
called
"<Link>"
Examples
:
Then
I should see the following links and ids
|
id
|
Link
|
|
about
|
About
|
|
jobs
|
Jobs
|
...
...
@@ -27,9 +25,7 @@ Feature: Homepage for web users
# TODO: test according to domain or policy
Scenario
:
User can see the partner institutions
Given
I visit the homepage
Then
I should see
"<Partner>"
in the Partners section
Examples
:
Then
I should see the following Partners in the Partners section
|
Partner
|
|
MITx
|
|
HarvardX
|
...
...
lms/djangoapps/courseware/features/homepage.py
View file @
7fe206a9
...
...
@@ -2,11 +2,22 @@
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
nose.tools
import
assert_in
from
nose.tools
import
assert_in
,
assert_equals
@step
(
'I should see "([^"]*)" in the Partners section$
'
)
def
i_should_see_partner
(
step
,
partner
):
@step
(
u'I should see the following Partners in the Partners section
'
)
def
i_should_see_partner
(
step
):
partners
=
world
.
browser
.
find_by_css
(
".partner .name span"
)
names
=
set
(
span
.
text
for
span
in
partners
)
assert_in
(
partner
,
names
)
for
partner
in
step
.
hashes
:
assert_in
(
partner
[
'Partner'
],
names
)
@step
(
u'I should see the following links and ids'
)
def
should_see_a_link_called
(
step
):
for
link_id_pair
in
step
.
hashes
:
link_id
=
link_id_pair
[
'id'
]
text
=
link_id_pair
[
'Link'
]
link
=
world
.
browser
.
find_by_id
(
link_id
)
assert
len
(
link
)
>
0
assert_equals
(
link
.
text
,
text
)
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