コード例 #1
0
def i_click_on_the_tab_and_check(step):
    for tab_title in step.hashes:
        tab_text = tab_title['TabName']
        title = tab_title['PageTitle']
        world.click_link(tab_text)
        world.wait_for(lambda _driver:title in world.browser.title)
        assert(title in world.browser.title)
コード例 #2
0
def i_verify_all_the_content_of_each_course(step):
    all_possible_courses = get_courses()
    logger.debug('Courses found:')
    for c in all_possible_courses:
        logger.debug(c.id)
    ids = [c.id for c in all_possible_courses]

    # Get a list of all the registered courses
    registered_courses = world.browser.find_by_css('article.my-course')
    if len(all_possible_courses) < len(registered_courses):
        assert False, "user is registered for more courses than are uniquely posssible"
    else:
        pass

    for test_course in registered_courses:
        test_course.css_click('a')
        check_for_errors()

        # Get the course. E.g. 'MITx/6.002x/2012_Fall'
        current_course = sub('/info', '',
                             sub('.*/courses/', '', world.browser.url))
        validate_course(current_course, ids)

        world.click_link('Courseware')
        assert world.is_css_present('accordion')
        check_for_errors()
        browse_course(current_course)

        # clicking the user link gets you back to the user's home page
        world.css_click('.user-link')
        check_for_errors()
コード例 #3
0
ファイル: smart-accordion.py プロジェクト: 2bj/edx-platform
def i_verify_all_the_content_of_each_course(step):
    all_possible_courses = get_courses()
    logger.debug('Courses found:')
    for c in all_possible_courses:
        logger.debug(c.id)
    ids = [c.id for c in all_possible_courses]

    # Get a list of all the registered courses
    registered_courses = world.browser.find_by_css('article.my-course')
    if len(all_possible_courses) < len(registered_courses):
        assert False, "user is registered for more courses than are uniquely posssible"
    else:
        pass

    for test_course in registered_courses:
        test_course.css_click('a')
        check_for_errors()

        # Get the course. E.g. 'MITx/6.002x/2012_Fall'
        current_course = sub('/info', '', sub('.*/courses/', '', world.browser.url))
        validate_course(current_course, ids)

        world.click_link('Courseware')
        assert world.is_css_present('accordion')
        check_for_errors()
        browse_course(current_course)

        # clicking the user link gets you back to the user's home page
        world.css_click('.user-link')
        check_for_errors()
コード例 #4
0
ファイル: high-level-tabs.py プロジェクト: jswope00/griffinx
def i_click_on_the_tab_and_check(step):
    for tab_title in step.hashes:
        tab_text = tab_title['TabName']
        title = tab_title['PageTitle']
        world.click_link(tab_text)
        world.wait_for(lambda _driver: title in world.browser.title)
        assert (title in world.browser.title)
コード例 #5
0
ファイル: upload.py プロジェクト: DazzaGreenwood/edx-platform
def upload_file(_step, is_test_file, file_name):
    world.click_link('Upload New File')

    if not is_test_file:
        _write_test_file(file_name, "test file")

    # uploading the file itself
    path = os.path.join(TEST_ROOT, 'uploads/', file_name)
    world.browser.execute_script("$('input.file-input').css('display', 'block')")
    world.browser.attach_file('file', os.path.abspath(path))
    close_css = 'a.close-button'
    world.css_click(close_css)
コード例 #6
0
def upload_file(_step, is_test_file, file_name):
    world.click_link('Upload New File')

    if not is_test_file:
        _write_test_file(file_name, "test file")

    # uploading the file itself
    path = os.path.join(TEST_ROOT, 'uploads/', file_name)
    world.browser.execute_script(
        "$('input.file-input').css('display', 'block')")
    world.browser.attach_file('file', os.path.abspath(path))
    close_css = 'a.close-button'
    world.css_click(close_css)
コード例 #7
0
def i_click_on_the_tab(step, tab_text):
    world.click_link(tab_text)
コード例 #8
0
def click_the_link_with_the_text_group1(step, linktext):
    world.click_link(linktext)
コード例 #9
0
def click_the_link_called(step, text):
    world.click_link(text)
コード例 #10
0
ファイル: navigation.py プロジェクト: burngeek8/edx-platform
def return_to_course(step):
    step.given('I visit the homepage')
    world.click_link("View Course")
    world.click_link("Courseware")
コード例 #11
0
ファイル: steps.py プロジェクト: CraftAcademy/edx-platform
def click_the_link_with_the_text_group1(step, linktext):
    world.click_link(linktext)
コード例 #12
0
ファイル: steps.py プロジェクト: CraftAcademy/edx-platform
def click_the_link_called(step, text):
    world.click_link(text)
コード例 #13
0
ファイル: navigation.py プロジェクト: olabi/edx-platform-seas
def and_i_return_to_the_courseware(step):
    world.visit('/')
    world.click_link("View Course")
    world.click_link("Courseware")
コード例 #14
0
def and_i_return_to_the_course(step):
    world.visit('/')
    world.click_link("View Course")
    course = 'a[href*="/courseware"]'
    world.css_click(course)
コード例 #15
0
def i_click_on_the_link(step, link_text):
    world.click_link(link_text)
コード例 #16
0
def and_i_return_to_the_courseware(step):
    world.visit('/')
    world.click_link("View Course")
    world.click_link("Courseware")
コード例 #17
0
ファイル: navigation.py プロジェクト: 28554010/edx-platform
def and_i_return_to_the_course(step):
    world.visit('/')
    world.click_link("View Course")
    course = 'a[href*="/courseware"]'
    world.css_click(course)
コード例 #18
0
def i_click_on_the_tab(step, tab_text):
    world.click_link(tab_text)
    world.save_the_html()
コード例 #19
0
def i_visit_the_staff_grading_page(step):
    world.click_link('Instructor')
    world.click_link('Staff grading')
コード例 #20
0
def return_to_course(step):
    step.given('I visit the homepage')
    world.click_link("View Course")
    world.click_link("Courseware")