Commit b03c4eca by Ben Patterson

Opening wiki editor should be extracted into a method.

parent 6e2e40cc
...@@ -456,6 +456,10 @@ class CourseWikiTest(UniqueCourseTest): ...@@ -456,6 +456,10 @@ class CourseWikiTest(UniqueCourseTest):
self.course_info_page.visit() self.course_info_page.visit()
self.tab_nav.go_to_tab('Wiki') self.tab_nav.go_to_tab('Wiki')
def _open_editor(self):
self.course_wiki_page.open_editor()
self.course_wiki_edit_page.wait_for_page()
def test_edit_course_wiki(self): def test_edit_course_wiki(self):
""" """
Wiki page by default is editable for students. Wiki page by default is editable for students.
...@@ -466,8 +470,7 @@ class CourseWikiTest(UniqueCourseTest): ...@@ -466,8 +470,7 @@ class CourseWikiTest(UniqueCourseTest):
""" """
content = "hello" content = "hello"
self.course_wiki_page.open_editor() self._open_editor()
self.course_wiki_edit_page.wait_for_page()
self.course_wiki_edit_page.replace_wiki_content(content) self.course_wiki_edit_page.replace_wiki_content(content)
self.course_wiki_edit_page.save_wiki_content() self.course_wiki_edit_page.save_wiki_content()
actual_content = unicode(self.course_wiki_page.q(css='.wiki-article p').text[0]) actual_content = unicode(self.course_wiki_page.q(css='.wiki-article p').text[0])
......
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