Code review feedback.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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> </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>
|
||||
"""
|
||||
|
||||
@@ -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 "(.*)"$')
|
||||
|
||||
Reference in New Issue
Block a user