diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index b5aa8195d1..8adbb0fdae 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -28,7 +28,7 @@ def see_a_single_step_component(step): for step_hash in step.hashes: component = step_hash['Component'] assert_in(component, ['Discussion', 'Video']) - component_css = 'div.xmodule_{}Module'.format(component) + component_css = '.xmodule_{}Module'.format(component) assert_true(world.is_css_present(component_css), "{} couldn't be found".format(component)) @@ -56,7 +56,7 @@ def see_a_multi_step_component(step, category): html_matcher = { 'Text': '\n \n', 'Announcement': '

Announcement Date

', - 'Zooming Image Tool': '

Zooming Image Tool

', + 'Zooming Image Tool': '

Zooming Image Tool

', 'E-text Written in LaTeX': '

Example: E-text page

', 'Raw HTML': '

This template is similar to the Text template. The only difference is', } @@ -64,19 +64,19 @@ def see_a_multi_step_component(step, category): assert_in(html_matcher[step_hash['Component']].strip(), actual_html.strip()) else: actual_text = world.css_text(selector, index=idx) - assert_in(step_hash['Component'].upper(), actual_text) + assert_in(step_hash['Component'], actual_text) @step(u'I see a "([^"]*)" Problem component$') def see_a_problem_component(step, category): - component_css = 'div.xmodule_CapaModule' + component_css = '.xmodule_CapaModule' assert_true(world.is_css_present(component_css), 'No problem was added to the unit.') - problem_css = 'li.studio-xblock-wrapper div.xblock-student_view' + problem_css = '.studio-xblock-wrapper .xblock-student_view' # This view presents the given problem component in uppercase. Assert that the text matches - # the component selected (in uppercase) - assert_true(world.css_contains_text(problem_css, category.upper())) + # the component selected + assert_true(world.css_contains_text(problem_css, category)) @step(u'I add a "([^"]*)" "([^"]*)" component$') @@ -88,17 +88,17 @@ def add_component_category(step, component, category): @step(u'I delete all components$') def delete_all_components(step): - count = len(world.css_find('ol.reorderable-container li.studio-xblock-wrapper')) + count = len(world.css_find('.reorderable-container .studio-xblock-wrapper')) step.given('I delete "' + str(count) + '" component') @step(u'I delete "([^"]*)" component$') def delete_components(step, number): world.wait_for_xmodule() - delete_btn_css = 'a.delete-button' - prompt_css = 'div#prompt-warning' - btn_css = '{} button.action-primary'.format(prompt_css) - saving_mini_css = 'div#page-notification .wrapper-notification-mini' + delete_btn_css = '.delete-button' + prompt_css = '#prompt-warning' + btn_css = '{} .action-primary'.format(prompt_css) + saving_mini_css = '#page-notification .wrapper-notification-mini' for _ in range(int(number)): world.css_click(delete_btn_css) assert_true( @@ -124,7 +124,7 @@ def see_no_components(steps): @step(u'I delete a component') def delete_one_component(step): - world.css_click('a.delete-button') + world.css_click('.delete-button') @step(u'I edit and save a component') @@ -141,16 +141,16 @@ def duplicated_component(step, ordinal): "third": 2, } index = ord_map[ordinal] - duplicate_btn_css = 'a.duplicate-button' + duplicate_btn_css = '.duplicate-button' world.css_click(duplicate_btn_css, int(index)) @step(u'I see a Problem component with display name "([^"]*)" in position "([^"]*)"$') def see_component_in_position(step, display_name, index): - component_css = 'div.xmodule_CapaModule' + component_css = '.xmodule_CapaModule' def find_problem(_driver): - return world.css_text(component_css, int(index)).startswith(display_name.upper()) + return world.css_text(component_css, int(index)).startswith(display_name) world.wait_for(find_problem, timeout_msg='Did not find the duplicated problem') @@ -158,7 +158,7 @@ def see_component_in_position(step, display_name, index): @step(u'I see the display name is "([^"]*)"') def check_component_display_name(step, display_name): # The display name for the unit uses the same structure, must differentiate by level-element. - label = world.css_html("section.level-element>header>div>div>span.xblock-display-name") + label = world.css_html(".level-element>header>div>div>span.xblock-display-name") assert_equal(display_name, label) diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 92f9fda6f9..c8fc76ed87 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -125,7 +125,7 @@ def my_display_name_change_is_persisted_on_save(step): @step('the problem display name is "(.*)"$') def verify_problem_display_name(step, name): - assert_equal(name.upper(), world.browser.find_by_css('.problem-header').text) + assert_equal(name, world.browser.find_by_css('.problem-header').text) @step('I can specify special characters in the display name') @@ -332,8 +332,8 @@ def i_edit_blank_problem_for_annotation_response(_step): @step(u'I can see cheatsheet$') def verify_cheat_sheet_displaying(_step): - world.css_click("a.cheatsheet-toggle") - css_selector = 'article.simple-editor-cheatsheet' + world.css_click(".cheatsheet-toggle") + css_selector = '.simple-editor-cheatsheet' world.wait_for_visible(css_selector) diff --git a/cms/static/images/cms-editor_checkbox.png b/cms/static/images/cms-editor_checkbox.png new file mode 100644 index 0000000000..30e0591cbd Binary files /dev/null and b/cms/static/images/cms-editor_checkbox.png differ diff --git a/cms/static/images/cms-editor_checkbox.svg b/cms/static/images/cms-editor_checkbox.svg new file mode 100644 index 0000000000..28a841b07c --- /dev/null +++ b/cms/static/images/cms-editor_checkbox.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/cms/static/images/cms-editor_dropdown.png b/cms/static/images/cms-editor_dropdown.png new file mode 100644 index 0000000000..fc204e7779 Binary files /dev/null and b/cms/static/images/cms-editor_dropdown.png differ diff --git a/cms/static/images/cms-editor_dropdown.svg b/cms/static/images/cms-editor_dropdown.svg new file mode 100644 index 0000000000..1c454266af --- /dev/null +++ b/cms/static/images/cms-editor_dropdown.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/cms/static/images/cms-editor_explanation.png b/cms/static/images/cms-editor_explanation.png new file mode 100644 index 0000000000..ef5d270c50 Binary files /dev/null and b/cms/static/images/cms-editor_explanation.png differ diff --git a/cms/static/images/cms-editor_explanation.svg b/cms/static/images/cms-editor_explanation.svg new file mode 100644 index 0000000000..545e28a80c --- /dev/null +++ b/cms/static/images/cms-editor_explanation.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + diff --git a/cms/static/images/cms-editor_heading.png b/cms/static/images/cms-editor_heading.png new file mode 100644 index 0000000000..11e7442ef8 Binary files /dev/null and b/cms/static/images/cms-editor_heading.png differ diff --git a/cms/static/images/cms-editor_heading.svg b/cms/static/images/cms-editor_heading.svg new file mode 100644 index 0000000000..1db34636ac --- /dev/null +++ b/cms/static/images/cms-editor_heading.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/cms/static/images/cms-editor_number.png b/cms/static/images/cms-editor_number.png new file mode 100644 index 0000000000..05cd08076d Binary files /dev/null and b/cms/static/images/cms-editor_number.png differ diff --git a/cms/static/images/cms-editor_number.svg b/cms/static/images/cms-editor_number.svg new file mode 100644 index 0000000000..d011a79831 --- /dev/null +++ b/cms/static/images/cms-editor_number.svg @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/cms/static/images/cms-editor_radio.png b/cms/static/images/cms-editor_radio.png new file mode 100644 index 0000000000..1657b72c61 Binary files /dev/null and b/cms/static/images/cms-editor_radio.png differ diff --git a/cms/static/images/cms-editor_radio.svg b/cms/static/images/cms-editor_radio.svg new file mode 100644 index 0000000000..a21b231fe7 --- /dev/null +++ b/cms/static/images/cms-editor_radio.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/cms/static/images/cms-editor_text.png b/cms/static/images/cms-editor_text.png new file mode 100644 index 0000000000..7c16befbfe Binary files /dev/null and b/cms/static/images/cms-editor_text.png differ diff --git a/cms/static/images/cms-editor_text.svg b/cms/static/images/cms-editor_text.svg new file mode 100644 index 0000000000..f999157204 --- /dev/null +++ b/cms/static/images/cms-editor_text.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/cms/static/images/problem-editor-icons.png b/cms/static/images/problem-editor-icons.png deleted file mode 100644 index 2d958fb96a..0000000000 Binary files a/cms/static/images/problem-editor-icons.png and /dev/null differ diff --git a/cms/templates/widgets/problem-edit.html b/cms/templates/widgets/problem-edit.html index 80596193f9..da0be1724e 100644 --- a/cms/templates/widgets/problem-edit.html +++ b/cms/templates/widgets/problem-edit.html @@ -13,24 +13,59 @@ %if enable_markdown:

@@ -43,12 +78,12 @@
-
${_("Heading 1")}
+
${_("Heading")}
- + ${_(
-
H1
+
H3
 =====
 
@@ -56,7 +91,7 @@
${_("Multiple Choice")}
- + ${_(
( ) red
@@ -67,7 +102,7 @@
             
${_("Checkboxes")}
- + ${_(
[x] earth
@@ -78,7 +113,7 @@
             
${_("Text Input")}
- + ${_(
= dog
@@ -89,7 +124,7 @@ or= mouse
${_("Numerical Input")}
- + ${_(
= 3.14 +- 2%
@@ -99,7 +134,7 @@ or= mouse
${_("Dropdown")}
- + ${_(
[[wrong, (right)]]
@@ -114,7 +149,7 @@ or= mouse
${_("Explanation")}
- + ${_(
[explanation] A short explanation of the answer. [explanation]
diff --git a/common/lib/xmodule/xmodule/css/editor/edit.scss b/common/lib/xmodule/xmodule/css/editor/edit.scss index c31c9656f7..d8cb28f966 100644 --- a/common/lib/xmodule/xmodule/css/editor/edit.scss +++ b/common/lib/xmodule/xmodule/css/editor/edit.scss @@ -13,14 +13,21 @@ padding: ($baseline/4); border-bottom-color: #a5aaaf; - a { - display: block; + button { + display: inline-block; @include float(left); - padding: 3px ($baseline/2) 7px; + padding: 3px ($baseline/2) 5px; margin-left: 7px; + border: 0; border-radius: 2px; + background: transparent; - &:hover, &:focus { + .icon { + height: 21px; + } + + &:hover, + &:focus { background: rgba(255, 255, 255, .5); } } @@ -60,4 +67,4 @@ } } } -} \ No newline at end of file +} diff --git a/common/lib/xmodule/xmodule/css/problem/edit.scss b/common/lib/xmodule/xmodule/css/problem/edit.scss index ac6f3f90ff..a3c6576e9a 100644 --- a/common/lib/xmodule/xmodule/css/problem/edit.scss +++ b/common/lib/xmodule/xmodule/css/problem/edit.scss @@ -7,6 +7,7 @@ margin-top: -4px; padding: 3px 9px; font-size: 12px; + color: $link-color; &.current { border: 1px solid $lightGrey !important; @@ -16,7 +17,8 @@ pointer-events: none; cursor: none; - &:hover, &:focus { + &:hover, + &:focus { box-shadow: 0 0 0 0 !important; background-color: $white; } @@ -79,11 +81,15 @@ } .col { - float: left; + display: block; &.sample { width: 60px; margin-right: 30px; + + .icon { + height: ($baseline * 1.5); + } } } @@ -110,40 +116,5 @@ width: 26px; height: 21px; vertical-align: middle; - background: url('#{$static-path}/images/problem-editor-icons.png') no-repeat; + color: $base-font-color; } - -.problem-editor-icon.heading1 { - width: 18px; - background-position: -265px 0; -} - -.problem-editor-icon.multiple-choice { - background-position: 0 0; -} - -.problem-editor-icon.checks { - background-position: -56px 0; -} - -.problem-editor-icon.string { - width: 28px; - background-position: -111px 0; -} - -.problem-editor-icon.number { - width: 24px; - background-position: -168px 0; -} - -.problem-editor-icon.dropdown { - width: 17px; - background-position: -220px 0; -} - -.problem-editor-icon.explanation { - width: 17px; - background-position: -307px 0; -} - - diff --git a/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html b/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html index 10511ecffc..d7d6d952d2 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html +++ b/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html @@ -10,7 +10,7 @@

Numerical Input -

+
(1/1 point)
diff --git a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee index 575b4c4246..a10ad3d4e4 100644 --- a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee +++ b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee @@ -258,9 +258,9 @@ describe 'MarkdownEditingDescriptor', -> """) it 'converts multiple choice shuffle to xml', -> data = MarkdownEditingDescriptor.markdownToXml("""A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets. - + One of the main elements that goes into a good multiple choice question is the existence of good distractors. That is, each of the alternate responses presented to the student should be the result of a plausible mistake that a student might make. - + What Apple device competed with the portable CD player? (!x@) The iPad (@) Napster @@ -268,16 +268,16 @@ describe 'MarkdownEditingDescriptor', -> ( ) The vegetable peeler ( ) Android (@) The Beatles - + [Explanation] The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks. [Explanation] """) expect(data).toEqual("""

A multiple choice problem presents radio buttons for student input. Students can only select a single option presented. Multiple Choice questions have been the subject of many areas of research due to the early invention and adoption of bubble sheets.

- +

One of the main elements that goes into a good multiple choice question is the existence of good distractors. That is, each of the alternate responses presented to the student should be the result of a plausible mistake that a student might make.

- +

What Apple device competed with the portable CD player?

@@ -289,11 +289,11 @@ describe 'MarkdownEditingDescriptor', -> The Beatles - +

Explanation

- +

The release of the iPod allowed consumers to carry their entire music library with them in a format that did not rely on fragile and energy-intensive spinning disks.

@@ -326,7 +326,7 @@ describe 'MarkdownEditingDescriptor', -> c - +

yatta

@@ -335,7 +335,7 @@ describe 'MarkdownEditingDescriptor', -> z - +

testa

@@ -344,13 +344,13 @@ describe 'MarkdownEditingDescriptor', -> iii - +

Explanation

- +

When the student is ready, the explanation appears.

- +
""") @@ -513,25 +513,25 @@ describe 'MarkdownEditingDescriptor', -> - +

Explanation

- +

Test Explanation.

- +
""") it 'handles multiple questions with labels', -> data = MarkdownEditingDescriptor.markdownToXml(""" France is a country in Europe. - + >>What is the capital of France?<< = Paris - + Germany is a country in Europe, too. - + >>What is the capital of Germany?<< ( ) Bonn ( ) Hamburg @@ -540,14 +540,14 @@ describe 'MarkdownEditingDescriptor', -> """) expect(data).toEqual("""

France is a country in Europe.

- +

What is the capital of France?

- +

Germany is a country in Europe, too.

- +

What is the capital of Germany?

@@ -557,8 +557,8 @@ describe 'MarkdownEditingDescriptor', -> Donut - - + +
""") it 'tests multiple questions with only one label', -> data = MarkdownEditingDescriptor.markdownToXml(""" @@ -577,14 +577,14 @@ describe 'MarkdownEditingDescriptor', -> """) expect(data).toEqual("""

France is a country in Europe.

- +

What is the capital of France?

- +

Germany is a country in Europe, too.

- +

What is the capital of Germany?

@@ -594,8 +594,8 @@ describe 'MarkdownEditingDescriptor', -> Donut - - + +
""") it 'tests malformed labels', -> data = MarkdownEditingDescriptor.markdownToXml(""" @@ -612,12 +612,12 @@ describe 'MarkdownEditingDescriptor', -> """) expect(data).toEqual("""

France is a country in Europe.

- +

>>What is the capital of France?<

- +

blahWhat is the capital of Germany?

@@ -627,8 +627,8 @@ describe 'MarkdownEditingDescriptor', -> Donut - - + +
""") it 'adds labels to formulae', -> data = MarkdownEditingDescriptor.markdownToXml(""" @@ -641,8 +641,8 @@ describe 'MarkdownEditingDescriptor', -> - - + + """) it 'escapes entities in labels', -> data = MarkdownEditingDescriptor.markdownToXml(""" @@ -654,8 +654,8 @@ describe 'MarkdownEditingDescriptor', -> - - + + """) # test oddities it 'converts headers and oddities to xml', -> @@ -710,7 +710,7 @@ describe 'MarkdownEditingDescriptor', -> """) expect(data).toEqual("""

Not a header

-

A header

+

A header

Multiple choice w/ parentheticals

diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index e14a4d3d45..2e791633a4 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -23,7 +23,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor @setCurrentEditor(@markdown_editor) # Add listeners for toolbar buttons (only present for markdown editor) @element.on('click', '.xml-tab', @onShowXMLButton) - @element.on('click', '.format-buttons a', @onToolbarButton) + @element.on('click', '.format-buttons button', @onToolbarButton) @element.on('click', '.cheatsheet-toggle', @toggleCheatsheet) # Hide the XML text area $(@element.find('.xml-box')).hide() @@ -131,7 +131,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ### save: -> @element.off('click', '.xml-tab', @changeEditor) - @element.off('click', '.format-buttons a', @onToolbarButton) + @element.off('click', '.format-buttons button', @onToolbarButton) @element.off('click', '.cheatsheet-toggle', @toggleCheatsheet) if @current_editor == @markdown_editor { @@ -202,7 +202,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor xml = xml.replace(/\r\n/g, '\n'); // replace headers - xml = xml.replace(/(^.*?$)(?=\n\=\=+$)/gm, '

$1

'); + xml = xml.replace(/(^.*?$)(?=\n\=\=+$)/gm, '

$1

'); xml = xml.replace(/\n^\=\=+$/gm, ''); // Pull out demand hints, || a hint || diff --git a/common/lib/xmodule/xmodule/js/src/video/01_initialize.js b/common/lib/xmodule/xmodule/js/src/video/01_initialize.js index 3808ec7c4c..bc9342c232 100644 --- a/common/lib/xmodule/xmodule/js/src/video/01_initialize.js +++ b/common/lib/xmodule/xmodule/js/src/video/01_initialize.js @@ -293,9 +293,9 @@ function (VideoPlayer, i18n, moment) { _hideWaitPlaceholder(state); state.el .find('.video-player div') - .addClass('hidden') - .end() - .find('.video-player h3') + .addClass('hidden'); + state.el + .find('.video-player .video-error') .removeClass('hidden'); return false; @@ -497,7 +497,7 @@ function (VideoPlayer, i18n, moment) { this.el.find('.video-player div') .removeClass('hidden'); - this.el.find('.video-player h3') + this.el.find('.video-player .video-error') .addClass('hidden'); // If in reality the timeout was to short, try to @@ -510,7 +510,7 @@ function (VideoPlayer, i18n, moment) { // In-browser HTML5 player does not support quality // control. - this.el.find('a.quality_control').hide(); + this.el.find('.quality_control').hide(); _renderElements(this); } } diff --git a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js index dca85c9d85..6862daf26a 100644 --- a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js +++ b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js @@ -99,7 +99,7 @@ function () { .find('.video-player div') .addClass('hidden') .end() - .find('.video-player h3') + .find('.video-player .video-error') .removeClass('hidden') .end() .addClass('is-initialized') @@ -125,7 +125,7 @@ function () { this.el .find('.video-player div').removeClass('hidden') .end() - .find('.video-player h3').addClass('hidden') + .find('.video-player .video-error').addClass('hidden') .end().removeClass('is-initialized') .find('.spinner').attr({'aria-hidden': 'false'}); this.videoEl.remove(); diff --git a/common/test/acceptance/pages/lms/video/video.py b/common/test/acceptance/pages/lms/video/video.py index cfd84899a2..6e421b018c 100644 --- a/common/test/acceptance/pages/lms/video/video.py +++ b/common/test/acceptance/pages/lms/video/video.py @@ -14,7 +14,7 @@ import logging log = logging.getLogger('VideoPage') VIDEO_BUTTONS = { - 'transcript': '.lang', + 'transcript': '.language-menu', 'transcript_button': '.toggle-transcript', 'cc_button': '.toggle-captions', 'volume': '.volume', @@ -35,14 +35,14 @@ CSS_CLASS_NAMES = { 'captions_text': '.subtitles li', 'captions_text_getter': '.subtitles li[role="link"][data-index="1"]', 'closed_captions': '.closed-captions', - 'error_message': '.video .video-player h3', + 'error_message': '.video .video-player .video-error', 'video_container': '.video', 'video_sources': '.video-player video source', 'video_spinner': '.video-wrapper .spinner', 'video_xmodule': '.xmodule_VideoModule', 'video_init': '.is-initialized', 'video_time': '.vidtime', - 'video_display_name': '.vert h2', + 'video_display_name': '.vert h3', 'captions_lang_list': '.langs-list li', 'video_speed': '.speeds .value', 'poster': '.poster', @@ -631,7 +631,6 @@ class VideoPage(PageObject): language_selector = VIDEO_MENUS["language"] + ' li[data-lang-code="{code}"]'.format(code=code) language_selector = self.get_element_selector(language_selector) - self.wait_for_element_visibility(language_selector, 'language menu is visible') self.q(css=language_selector).first.click() diff --git a/common/test/acceptance/tests/lms/test_library.py b/common/test/acceptance/tests/lms/test_library.py index 7c371cda63..7609cbcd3e 100644 --- a/common/test/acceptance/tests/lms/test_library.py +++ b/common/test/acceptance/tests/lms/test_library.py @@ -265,7 +265,7 @@ class StudioLibraryContainerCapaFilterTest(LibraryContentTestBase, TestWithSearc @property def _problem_headers(self): """ Expected XBLock headers according to populate_library_fixture """ - return frozenset(child.display_name.upper() for child in self.library_fixture.children) + return frozenset(child.display_name for child in self.library_fixture.children) def _set_library_content_settings(self, count=1, capa_type="Any Type"): """ @@ -304,7 +304,7 @@ class StudioLibraryContainerCapaFilterTest(LibraryContentTestBase, TestWithSearc self.assertEqual(len(children_headers), 1) self.assertLessEqual( children_headers, - set([header.upper() for header in ["Problem Choice Group 1", "Problem Choice Group 2"]]) + set(["Problem Choice Group 1", "Problem Choice Group 2"]) ) # Choice group test @@ -312,7 +312,7 @@ class StudioLibraryContainerCapaFilterTest(LibraryContentTestBase, TestWithSearc self.assertEqual(len(children_headers), 2) self.assertEqual( children_headers, - set([header.upper() for header in ["Problem Select 1", "Problem Select 2"]]) + set(["Problem Select 1", "Problem Select 2"]) ) # Missing problem type test diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py index 1c93f57865..05c4b99776 100644 --- a/common/test/acceptance/tests/lms/test_lms.py +++ b/common/test/acceptance/tests/lms/test_lms.py @@ -1013,7 +1013,7 @@ class ProblemExecutionTest(UniqueCourseTest): self.course_nav.go_to_section('Test Section', 'Test Subsection') problem_page = ProblemPage(self.browser) - self.assertEqual(problem_page.problem_name, 'PYTHON PROBLEM') + self.assertEqual(problem_page.problem_name.upper(), 'PYTHON PROBLEM') # Does the page have computation results? self.assertIn("What is the sum of 17 and 3?", problem_page.problem_text) diff --git a/common/test/acceptance/tests/lms/test_lms_courseware.py b/common/test/acceptance/tests/lms/test_lms_courseware.py index 4c9d0d8a02..c748b17b99 100644 --- a/common/test/acceptance/tests/lms/test_lms_courseware.py +++ b/common/test/acceptance/tests/lms/test_lms_courseware.py @@ -66,7 +66,7 @@ class CoursewareTest(UniqueCourseTest): """ self.courseware_page.visit() self.problem_page = ProblemPage(self.browser) - self.assertEqual(self.problem_page.problem_name, 'TEST PROBLEM 1') + self.assertEqual(self.problem_page.problem_name, 'Test Problem 1') def _create_breadcrumb(self, index): """ Create breadcrumb """ @@ -103,8 +103,8 @@ class CoursewareTest(UniqueCourseTest): # Visit courseware as a student. self.courseware_page.visit() - # Problem name should be "TEST PROBLEM 2". - self.assertEqual(self.problem_page.problem_name, 'TEST PROBLEM 2') + # Problem name should be "Test Problem 2". + self.assertEqual(self.problem_page.problem_name, 'Test Problem 2') def test_course_tree_breadcrumb(self): """ diff --git a/common/test/acceptance/tests/lms/test_lms_matlab_problem.py b/common/test/acceptance/tests/lms/test_lms_matlab_problem.py index 43847c7f7e..cd698bb178 100644 --- a/common/test/acceptance/tests/lms/test_lms_matlab_problem.py +++ b/common/test/acceptance/tests/lms/test_lms_matlab_problem.py @@ -56,7 +56,7 @@ class MatlabProblemTest(ProblemsTest): """ self.courseware_page.visit() matlab_problem_page = MatlabProblemPage(self.browser) - self.assertEqual(matlab_problem_page.problem_name, 'TEST MATLAB PROBLEM') + self.assertEqual(matlab_problem_page.problem_name, 'Test Matlab Problem') return matlab_problem_page def test_run_code(self): diff --git a/lms/djangoapps/courseware/features/lti.feature b/lms/djangoapps/courseware/features/lti.feature index 3ac9564f7a..a10b706ce2 100644 --- a/lms/djangoapps/courseware/features/lti.feature +++ b/lms/djangoapps/courseware/features/lti.feature @@ -128,7 +128,7 @@ Feature: LMS.LTI component | open_in_a_new_page | hide_launch | | False | True | Then in the LTI component I do not see a launch button - Then I see LTI component module title with text "LTI (EXTERNAL RESOURCE)" + Then I see LTI component module title with text "LTI (External resource)" #12 Scenario: LTI component that set to hide_launch and not open_in_a_new_page shows no iframe @@ -137,7 +137,7 @@ Feature: LMS.LTI component | open_in_a_new_page | hide_launch | | True | True | Then in the LTI component I do not see an provider iframe - Then I see LTI component module title with text "LTI (EXTERNAL RESOURCE)" + Then I see LTI component module title with text "LTI (External resource)" #13 Scenario: LTI component button text is correctly displayed diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py index 51b8cc17e5..4520b410b0 100644 --- a/lms/djangoapps/courseware/features/navigation.py +++ b/lms/djangoapps/courseware/features/navigation.py @@ -114,17 +114,17 @@ def when_i_navigate_to_an_item_in_a_sequence(step): @step(u'I see the content of the section') def then_i_see_the_content_of_the_section(step): - wait_for_problem('PROBLEM 2') + wait_for_problem('Problem 2') @step(u'I see the content of the subsection') def then_i_see_the_content_of_the_subsection(step): - wait_for_problem('PROBLEM 4') + wait_for_problem('Problem 4') @step(u'I see the content of the sequence item') def then_i_see_the_content_of_the_sequence_item(step): - wait_for_problem('PROBLEM 6') + wait_for_problem('Problem 6') @step(u'I return to the courseware') @@ -183,6 +183,6 @@ def wait_for_problem(display_name): world.wait_for_ajax_complete() wait_func = lambda _: world.css_has_text( - 'h3.problem-header', display_name, strip=True + '.problem-header', display_name, strip=True ) world.wait_for(wait_func) diff --git a/lms/templates/video.html b/lms/templates/video.html index 0034a0561d..c5fb463102 100644 --- a/lms/templates/video.html +++ b/lms/templates/video.html @@ -23,7 +23,7 @@
- +