Code review feedback.

This commit is contained in:
cahrens
2014-03-21 15:00:31 -04:00
parent b0c35982a6
commit bb0a58abf7
5 changed files with 20 additions and 16 deletions

View File

@@ -329,9 +329,11 @@ def type_in_codemirror(index, text, find_prefix="$"):
def get_codemirror_value(index=0, find_prefix="$"):
return world.browser.driver.execute_script("""
return world.browser.driver.execute_script(
"""
return {find_prefix}('div.CodeMirror:eq({index})').get(0).CodeMirror.getValue();
""".format(index=index, find_prefix=find_prefix))
""".format(index=index, find_prefix=find_prefix)
)
def upload_file(filename):

View File

@@ -39,9 +39,8 @@ Feature: CMS.HTML Editor
When I edit the page
And type "<p class='title'>pages</p><style><!-- .title { color: red; } --></style>" in the code editor and press OK
And I save the page
Then the page text is:
Then the page text contains:
"""
<p>&nbsp;</p>
<p class="title">pages</p>
<style><!--
.title { color: red; }
@@ -66,7 +65,7 @@ Feature: CMS.HTML Editor
And I set the text to "display as code" and I select the text
And I select the code toolbar button
And I save the page
Then the page text is:
Then the page text contains:
"""
<p><code>display as code</code></p>
"""

View File

@@ -99,9 +99,9 @@ def i_click_on_save(step):
world.save_component(step)
@step('the page text is:')
@step('the page text contains:')
def check_page_text(step):
assert_equal(step.multiline, world.css_find('.xmodule_HtmlModule').html.strip())
assert_in(step.multiline, world.css_find('.xmodule_HtmlModule').html)
@step('the src link is rewritten to "(.*)"$')