Acceptance tests for online help.
This commit is contained in:
@@ -6,11 +6,16 @@ from component_settings_editor_helpers import enter_xml_in_advanced_problem
|
||||
from nose.tools import assert_true, assert_equal
|
||||
|
||||
|
||||
@step('I export the course$')
|
||||
def i_export_the_course(step):
|
||||
@step('I go to the export page$')
|
||||
def i_go_to_the_export_page(step):
|
||||
world.click_tools()
|
||||
link_css = 'li.nav-course-tools-export a'
|
||||
world.css_click(link_css)
|
||||
|
||||
|
||||
@step('I export the course$')
|
||||
def i_export_the_course(step):
|
||||
step.given('I go to the export page')
|
||||
world.css_click('a.action-export')
|
||||
|
||||
|
||||
@@ -30,7 +35,7 @@ def i_enter_bad_xml(step):
|
||||
|
||||
|
||||
@step('I edit and enter an ampersand$')
|
||||
def i_enter_bad_xml(step):
|
||||
def i_enter_an_ampersand(step):
|
||||
enter_xml_in_advanced_problem(step, "<problem>&</problem>")
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
from lettuce import world
|
||||
from lettuce import world, step
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ def import_file(filename):
|
||||
world.css_click(outline_css)
|
||||
|
||||
|
||||
def go_to_import():
|
||||
@step('I go to the import page$')
|
||||
def go_to_import(step):
|
||||
menu_css = 'li.nav-course-tools'
|
||||
import_css = 'li.nav-course-tools-import a'
|
||||
world.css_click(menu_css)
|
||||
|
||||
49
cms/djangoapps/contentstore/features/help.feature
Normal file
49
cms/djangoapps/contentstore/features/help.feature
Normal file
@@ -0,0 +1,49 @@
|
||||
@shard_1
|
||||
Feature: CMS.Help
|
||||
As a course author, I am able to access online help
|
||||
|
||||
Scenario: Users can access online help on course listing page
|
||||
Given There are no courses
|
||||
And I am logged into Studio
|
||||
Then I should see online help for "get_started"
|
||||
|
||||
|
||||
Scenario: Users can access online help within a course
|
||||
Given I have opened a new course in Studio
|
||||
|
||||
And I click the course link in My Courses
|
||||
Then I should see online help for "organizing_course"
|
||||
|
||||
And I go to the course updates page
|
||||
Then I should see online help for "updates"
|
||||
|
||||
And I go to the pages page
|
||||
Then I should see online help for "pages"
|
||||
|
||||
And I go to the files and uploads page
|
||||
Then I should see online help for "files"
|
||||
|
||||
And I go to the textbooks page
|
||||
Then I should see online help for "textbooks"
|
||||
|
||||
And I select Schedule and Details
|
||||
Then I should see online help for "setting_up"
|
||||
|
||||
And I am viewing the grading settings
|
||||
Then I should see online help for "grading"
|
||||
|
||||
And I am viewing the course team settings
|
||||
Then I should see online help for "course-team"
|
||||
|
||||
And I select the Advanced Settings
|
||||
Then I should see online help for "index"
|
||||
|
||||
And I select Checklists from the Tools menu
|
||||
Then I should see online help for "checklist"
|
||||
|
||||
And I go to the import page
|
||||
Then I should see online help for "import"
|
||||
|
||||
And I go to the export page
|
||||
Then I should see online help for "export"
|
||||
|
||||
17
cms/djangoapps/contentstore/features/help.py
Normal file
17
cms/djangoapps/contentstore/features/help.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from lettuce import world, step
|
||||
from nose.tools import assert_false
|
||||
|
||||
|
||||
def find_online_help_for(page_name):
|
||||
return world.browser.find_by_xpath(
|
||||
'//li[contains(@class, "nav-account-help")]//a[contains(@href, "{page_name}")]'.format(
|
||||
page_name=page_name
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@step(u'I should see online help for "([^"]*)"$')
|
||||
def see_online_help_for(step, page_name):
|
||||
elements_found = find_online_help_for(page_name)
|
||||
assert_false(elements_found.is_empty())
|
||||
|
||||
@@ -6,7 +6,7 @@ from lettuce import world, step
|
||||
from nose.tools import assert_equal, assert_true # pylint: disable=E0611
|
||||
from common import type_in_codemirror, open_new_course
|
||||
from advanced_settings import change_value
|
||||
from course_import import import_file, go_to_import
|
||||
from course_import import import_file
|
||||
|
||||
DISPLAY_NAME = "Display Name"
|
||||
MAXIMUM_ATTEMPTS = "Maximum Attempts"
|
||||
@@ -218,11 +218,6 @@ def i_have_empty_course(step):
|
||||
open_new_course()
|
||||
|
||||
|
||||
@step(u'I go to the import page')
|
||||
def i_go_to_import(_step):
|
||||
go_to_import()
|
||||
|
||||
|
||||
@step(u'I import the file "([^"]*)"$')
|
||||
def i_import_the_file(_step, filename):
|
||||
import_file(filename)
|
||||
|
||||
Reference in New Issue
Block a user