Commit 56015e4b by Peter Fogg

Update CHANGELOG.rst; move acceptance test methods into more appropriate files; docstring cleaning.

parent 8159e861
...@@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes, ...@@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected. the top. Include a label indicating the component affected.
Studio: Remove XML from the video component editor. All settings are
moved to be edited as metadata.
Studio, LMS: Make ModelTypes more strict about their expected content (for Studio, LMS: Make ModelTypes more strict about their expected content (for
instance, Boolean, Integer, String), but also allow them to hold either the instance, Boolean, Integer, String), but also allow them to hold either the
typed value, or a String that can be converted to their typed value. For example, typed value, or a String that can be converted to their typed value. For example,
......
...@@ -169,3 +169,13 @@ def open_new_unit(step): ...@@ -169,3 +169,13 @@ def open_new_unit(step):
step.given('I have added a new subsection') step.given('I have added a new subsection')
step.given('I expand the first section') step.given('I expand the first section')
world.css_click('a.new-unit-item') world.css_click('a.new-unit-item')
@step('when I view the video it (.*) show the captions')
def shows_captions(step, show_captions):
# Prevent cookies from overriding course settings
world.browser.cookies.delete('hide_captions')
if show_captions == 'does not':
assert world.css_find('.video')[0].has_class('closed')
else:
assert world.is_css_not_present('.video.closed')
...@@ -14,3 +14,10 @@ def i_see_the_correct_settings_and_values(step): ...@@ -14,3 +14,10 @@ def i_see_the_correct_settings_and_values(step):
['Speed: .75x', '', False], ['Speed: .75x', '', False],
['Speed: 1.25x', '', False], ['Speed: 1.25x', '', False],
['Speed: 1.5x', '', False]]) ['Speed: 1.5x', '', False]])
@step('I have set "show captions" to (.*)')
def set_show_captions(step, setting):
world.css_click('a.edit-button')
world.browser.select('Show Captions', setting)
world.css_click('a.save-button')
...@@ -31,20 +31,3 @@ def hide_or_show_captions(step, shown): ...@@ -31,20 +31,3 @@ def hide_or_show_captions(step, shown):
button = world.css_find(button_css) button = world.css_find(button_css)
button.mouse_out() button.mouse_out()
world.css_click(button_css) world.css_click(button_css)
@step('when I view the video it (.*) show the captions')
def shows_captions(step, show_captions):
# Prevent cookies from overriding course settings
world.browser.cookies.delete('hide_captions')
if show_captions == 'does not':
assert world.css_find('.video')[0].has_class('closed')
else:
assert world.is_css_not_present('.video.closed')
@step('I have set "show captions" to (.*)')
def set_show_captions(step, setting):
world.css_click('a.edit-button')
world.browser.select('Show Captions', setting)
world.css_click('a.save-button')
...@@ -6,9 +6,9 @@ from .test_import import DummySystem ...@@ -6,9 +6,9 @@ from .test_import import DummySystem
class VideoDescriptorImportTestCase(unittest.TestCase): class VideoDescriptorImportTestCase(unittest.TestCase):
''' """
Make sure that VideoDescriptor can import an old XML-based video correctly. Make sure that VideoDescriptor can import an old XML-based video correctly.
''' """
def test_from_xml(self): def test_from_xml(self):
module_system = DummySystem(load_error_modules=True) module_system = DummySystem(load_error_modules=True)
...@@ -34,10 +34,10 @@ class VideoDescriptorImportTestCase(unittest.TestCase): ...@@ -34,10 +34,10 @@ class VideoDescriptorImportTestCase(unittest.TestCase):
self.assertEquals(output.source, 'http://www.example.com/source.mp4') self.assertEquals(output.source, 'http://www.example.com/source.mp4')
def test_from_xml_missing_attributes(self): def test_from_xml_missing_attributes(self):
''' """
Ensure that attributes have the right values if they aren't Ensure that attributes have the right values if they aren't
explicitly set in XML. explicitly set in XML.
''' """
module_system = DummySystem(load_error_modules=True) module_system = DummySystem(load_error_modules=True)
xml_data = ''' xml_data = '''
<video display_name="Test Video" <video display_name="Test Video"
...@@ -59,9 +59,9 @@ class VideoDescriptorImportTestCase(unittest.TestCase): ...@@ -59,9 +59,9 @@ class VideoDescriptorImportTestCase(unittest.TestCase):
self.assertEquals(output.source, 'http://www.example.com/source.mp4') self.assertEquals(output.source, 'http://www.example.com/source.mp4')
def test_from_xml_no_attributes(self): def test_from_xml_no_attributes(self):
''' """
Make sure settings are correct if none are explicitly set in XML. Make sure settings are correct if none are explicitly set in XML.
''' """
module_system = DummySystem(load_error_modules=True) module_system = DummySystem(load_error_modules=True)
xml_data = '<video></video>' xml_data = '<video></video>'
output = VideoDescriptor.from_xml(xml_data, module_system) output = VideoDescriptor.from_xml(xml_data, module_system)
......
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