Look for the existence of the links, not for
the actual urls
This commit is contained in:
@@ -122,6 +122,13 @@ def should_see_a_link_called(step, text):
|
||||
assert len(world.browser.find_link_by_text(text)) > 0
|
||||
|
||||
|
||||
@step(r'should see (?:the|a) link with the id "([^"]*)" called "([^"]*)"$')
|
||||
def should_have_link_with_id_and_text(step, link_id, text):
|
||||
link = world.browser.find_by_id(link_id)
|
||||
assert len(link) > 0
|
||||
assert_equals(link.text, text)
|
||||
|
||||
|
||||
@step(r'should see "(.*)" (?:somewhere|anywhere) in (?:the|this) page')
|
||||
def should_see_in_the_page(step, text):
|
||||
assert_in(text, world.css_text('body'))
|
||||
|
||||
@@ -5,29 +5,24 @@ Feature: Homepage for web users
|
||||
|
||||
Scenario: User can see the "Login" button
|
||||
Given I visit the homepage
|
||||
Then I should see a link called "Log In"
|
||||
Then I should see a link called "Log in"
|
||||
|
||||
Scenario: User can see the "Sign up" button
|
||||
Scenario: User can see the "Register Now" button
|
||||
Given I visit the homepage
|
||||
Then I should see a link called "Sign Up"
|
||||
Then I should see a link called "Register Now"
|
||||
|
||||
Scenario Outline: User can see main parts of the page
|
||||
Given I visit the homepage
|
||||
Then I should see a link called "<Link>"
|
||||
When I click the link with the text "<Link>"
|
||||
Then I should see that the path is "<Path>"
|
||||
Then I should see a link with the id "<id>" called "<Link>"
|
||||
|
||||
Examples:
|
||||
| Link | Path |
|
||||
| Find Courses | /courses |
|
||||
| About | /about |
|
||||
| Jobs | /jobs |
|
||||
| Contact | /contact |
|
||||
| id | Link |
|
||||
| about | About |
|
||||
| jobs | Jobs |
|
||||
| faq | FAQ |
|
||||
| contact | Contact|
|
||||
| press | Press |
|
||||
|
||||
Scenario: User can visit the blog
|
||||
Given I visit the homepage
|
||||
When I click the link with the text "Blog"
|
||||
Then I should see that the url is "http://blog.edx.org/"
|
||||
|
||||
# TODO: test according to domain or policy
|
||||
Scenario: User can see the partner institutions
|
||||
|
||||
@@ -8,27 +8,27 @@
|
||||
<nav class="nav-colophon">
|
||||
<ol>
|
||||
<li class="nav-colophon-01">
|
||||
<a href="${marketing_link('ABOUT')}">
|
||||
<a id="about" href="${marketing_link('ABOUT')}">
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-02">
|
||||
<a href="${marketing_link('JOBS')}">
|
||||
<a id="jobs" href="${marketing_link('JOBS')}">
|
||||
Jobs
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-03">
|
||||
<a href="${marketing_link('PRESS')}">
|
||||
<a id="press" href="${marketing_link('PRESS')}">
|
||||
Press
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-04">
|
||||
<a href="${marketing_link('FAQ')}">
|
||||
<a id="faq" href="${marketing_link('FAQ')}">
|
||||
FAQ
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-colophon-05">
|
||||
<a href="${marketing_link('CONTACT')}">
|
||||
<a id="contact" href="${marketing_link('CONTACT')}">
|
||||
Contact
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user