Commit a7263d2a by Mark L. Chang

requirements and hello world acceptance test

parent 6a05a812
Feature: Homepage renders
In order to get an idea of edX
As anonymous web users
We want to see lots of information about edX on the home page
Scenario: We can see all the courses
Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/"
I should see "3.091x"
I should see "CS50x"
I should see "CS169.1x"
I should see "6.002x"
I should see "PH207x"
I should see "CS188.1x"
I should see "6.00x"
Scenario: We can see the "Login" button
Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/"
I should see "Sign Up"
Scenario: We can see the "Sign up" button
Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/"
I should see "Log In"
Scenario: We can see the three partner institutions
Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/"
I should see "MITx"
I should see "HarvardX"
I should see "BerkeleyX"
\ No newline at end of file
Feature: Homepage renders
In order to create an account
As someone who wants to use the site
We'll see if I can create an account
Scenario: Visit the homepage to Sign Up
#Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/"
Given I visit "http://edx.org/"
When I click "SIGN UP"
And I signup with "bob@bob.com" in the "email" field
And I signup with "password" in the "password" field
And I fill in "username" with "Bjones1986"
And I fill in "name" with "Bob Jones"
#And I select "Master\'s or professional degree" from "level_of_education"
#And I select the option "(.*)" from the selection "(.*)"
#And I check "terms_of_service"
#And I check "honor_code"
#And I click "CREATE MY ACCOUNT"
\ No newline at end of file
from lettuce import * #before, world
from selenium import *
import lettuce_webdriver.webdriver
from selenium.webdriver import ActionChains
@step(u'I signup with "(.*)" in the "(.*)" field')
def i_signup_with_data_in_the_field_field(step, data, field):
#e = world.browser.find_element_by_css_selector("div.input-group").find_element_by_name("email")
e = world.browser.find_element_by_xpath("//section[@id='signup-modal']").find_element_by_name(field)
e.send_keys(data)
@step(u'I fill the "(.*)" field with "(.*)"')
def i_fill_the_field_with_value(step, name, value):
field = world.browser.find_element_by_name(name);
field.send_keys(value);
@step(u'I select "(.*)" from "(.*)"')
def i_select_option_from_selection(step, option, selection):
select = world.browser.find_element_by_name(selection)
allOptions = select.find_elements_by_tag_name("option")
for option in allOptions:
if (option.name == option):
option.click()
from lettuce import before, after, world
from selenium import webdriver
import lettuce_webdriver.webdriver
@before.all
def setup_browser():
world.browser = webdriver.Firefox()
@after.all
def teardown_browser(total):
world.browser.quit()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment