Commit c4da8fba by Dean Dieker

added high level tabbing check in high-level-tabs.feature and commmitted change…

added high level tabbing check in high-level-tabs.feature and commmitted change pointing the smart-accordion to stage-edx-001
parent b9b2e98a
Feature: All the high level tabs should work
In order to make sure high level tabs work
As an acceptance test
I want to click Courseware, Course Info, Discussion, Wiki, Progress, Instructor
Scenario: Login to an existing staff account
Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/dashboard"
When I click "LOG IN"
And I login with "ddieker+admin@gmail.com" in the "email" field
And I login with "password" in the "password" field
And I press "Access My Courses"
Then I should see an element with class of "user" within "3" seconds
Scenario: I visit my registered courses
I access a registered course
I click on "Courseware"
I click on "Course Info"
I click on "Discussion"
I click on "Wiki"
I click on "Progress"
I click on "Instructor"
from lettuce import * #before, world
from selenium import *
import lettuce_webdriver.webdriver
import logging
import nose.tools
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
import re
import os.path
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'static'))
if not path in sys.path:
sys.path.insert(1, path)
del path
from helpers import *
@step(u'I access a registered course')
def i_access_a_registered_course(step):
wait_until_class_renders('my-courses',1)
world.browser.find_element_by_xpath("//*[@class='my-course']//a").click()
wait_until_class_renders('content-wrapper',2)
@step(u'I click on "(.*)"')
def i_click_on_tab(step, tabname):
world.browser.find_element_by_link_text(tabname).click()
check_for_errors()
\ No newline at end of file
...@@ -4,9 +4,9 @@ Feature: There are courses on the homepage ...@@ -4,9 +4,9 @@ Feature: There are courses on the homepage
I want to count all the chapters, sections, and tabs for each course I want to count all the chapters, sections, and tabs for each course
Scenario: Login to an existing account Scenario: Login to an existing account
Given I visit "http://localhost:8000/" Given I visit "http://anant:agarwal@stage-edx-001.m.edx.org/dashboard"
When I click "LOG IN" When I click "LOG IN"
And I login with "ddieker++@gmail.com" in the "email" field And I login with "ddieker+admin@gmail.com" in the "email" field
And I login with "password" in the "password" field And I login with "password" in the "password" field
And I press "Access My Courses" And I press "Access My Courses"
Then I should see an element with class of "user" within "3" seconds Then I should see an element with class of "user" within "3" seconds
......
...@@ -49,7 +49,7 @@ def i_verify_all_the_content_of_each_course(step): ...@@ -49,7 +49,7 @@ def i_verify_all_the_content_of_each_course(step):
i = 0 i = 0
while i < registered_courses: while i < registered_courses:
world.browser.find_element_by_xpath("//section[@class='my-courses']//article["+str(i+1)+"]//a").click() world.browser.find_element_by_xpath("//section[@class='my-courses']//article["+str(i+1)+"]//a").click()
wait_until_class_renders('my-courses',1) #wait_until_class_renders('my-courses',2)
check_for_errors() check_for_errors()
current_course = re.sub('/info','',re.sub('.*/courses/','',world.browser.current_url)) current_course = re.sub('/info','',re.sub('.*/courses/','',world.browser.current_url))
......
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