Merge pull request #11481 from edx/zoldak/remove-lettuce-homepage-test
Convert homepage acceptance test to bok-choy
This commit is contained in:
@@ -51,3 +51,8 @@ class IndexPage(PageObject):
|
||||
Returns a browser query object representing the video modal element
|
||||
"""
|
||||
return self.q(css=VIDEO_MODAL_SELECTOR)
|
||||
|
||||
@property
|
||||
def footer_links(self):
|
||||
"""Return a list of the text of the links in the page footer."""
|
||||
return self.q(css='.nav-colophon a').attrs('text')
|
||||
|
||||
@@ -40,6 +40,8 @@ class LmsIndexPageTest(BaseLmsIndexTest):
|
||||
Perform a general validation of the index page, renders normally, no exceptions raised, etc.
|
||||
"""
|
||||
self.assertTrue(self.page.banner_element.visible)
|
||||
expected_links = [u'About', u'Blog', u'News', u'Help Center', u'Contact', u'Careers', u'Donate']
|
||||
self.assertEqual(self.page.footer_links, expected_links)
|
||||
|
||||
def test_intro_video_hidden_by_default(self):
|
||||
"""
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
@shard_1
|
||||
Feature: LMS.Homepage for web users
|
||||
In order to get an idea what edX is about
|
||||
As an anonymous web user
|
||||
I want to check the information on the home page
|
||||
|
||||
Scenario: User can see the "Sign in" button
|
||||
Given I visit the homepage
|
||||
Then I should see a link called "Sign in"
|
||||
|
||||
Scenario: User can see the "Register" button
|
||||
Given I visit the homepage
|
||||
Then I should see a link called "Register"
|
||||
|
||||
Scenario Outline: User can see main parts of the page
|
||||
Given I visit the homepage
|
||||
Then I should see the following links and ids
|
||||
| id | Link |
|
||||
| about | About |
|
||||
| careers | Careers |
|
||||
| help-center | Help Center |
|
||||
| contact | Contact |
|
||||
| news | News |
|
||||
@@ -1,19 +0,0 @@
|
||||
# pylint: disable=missing-docstring
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_equals, assert_greater # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
@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_greater(
|
||||
len(link),
|
||||
0,
|
||||
"Link length is less than 1. ID: {id} Text: {text}".format(id=link_id, text=text)
|
||||
)
|
||||
assert_equals(link.text, text)
|
||||
@@ -97,7 +97,23 @@
|
||||
"LOGGING_ENV": "sandbox",
|
||||
"LOG_DIR": "** OVERRIDDEN **",
|
||||
"MEDIA_URL": "",
|
||||
"MKTG_URL_LINK_MAP": {},
|
||||
"MKTG_URL_LINK_MAP": {
|
||||
"ABOUT": "about",
|
||||
"PRIVACY": "privacy",
|
||||
"TOS": "tos",
|
||||
"WHAT_IS_VERIFIED_CERT": "verified-certificate",
|
||||
"COURSES": "courses",
|
||||
"CONTACT": "contact",
|
||||
"NEWS": "news",
|
||||
"HONOR": "honor",
|
||||
"CAREERS": "careers",
|
||||
"HELP_CENTER": "help-center",
|
||||
"BLOG": "blog",
|
||||
"PRESS": "press",
|
||||
"DONATE": "donate",
|
||||
"ROOT": "root",
|
||||
"SITEMAP.XML": "sitemap_xml"
|
||||
},
|
||||
"PLATFORM_NAME": "edX",
|
||||
"REGISTRATION_EXTENSION_FORM": "openedx.core.djangoapps.user_api.tests.test_helpers.TestCaseForm",
|
||||
"REGISTRATION_EXTRA_FIELDS": {
|
||||
@@ -116,6 +132,7 @@
|
||||
"SITE_NAME": "localhost:8003",
|
||||
"STATIC_ROOT_BASE": "** OVERRIDDEN **",
|
||||
"STATIC_URL_BASE": "/static/",
|
||||
"SUPPORT_SITE_LINK": "https://support.example.com",
|
||||
"SYSLOG_SERVER": "",
|
||||
"TECH_SUPPORT_EMAIL": "technical@example.com",
|
||||
"THEME_NAME": "",
|
||||
|
||||
Reference in New Issue
Block a user