Commit c8dc10b2 by Saleem Latif

added wait for loading js files

parent 1c910cfb
......@@ -4,11 +4,13 @@ Course Schedule and Details Settings page.
"""
from __future__ import unicode_literals
from bok_choy.promise import EmptyPromise
from bok_choy.javascript import requirejs
from .course_page import CoursePage
from .utils import press_the_notification_button
@requirejs('js/factories/settings')
class SettingsPage(CoursePage):
"""
Course Schedule and Details Settings page.
......@@ -22,6 +24,13 @@ class SettingsPage(CoursePage):
def is_browser_on_page(self):
return self.q(css='body.view-settings').present
def wait_for_require_js(self):
"""
Wait for require-js to load javascript files.
"""
if hasattr(self, 'wait_for_js'):
self.wait_for_js() # pylint: disable=no-member
def refresh_and_wait_for_load(self):
"""
Refresh the page and wait for all resources to load.
......@@ -182,4 +191,5 @@ class SettingsPage(CoursePage):
lambda: self.q(css='body.view-settings').present,
'Page is refreshed'
).fulfill()
self.wait_for_require_js()
self.wait_for_ajax()
......@@ -40,7 +40,6 @@ class SettingsMilestonesTest(StudioCourseTest):
self.assertTrue(self.settings_detail.pre_requisite_course_options)
@skip # TODO: fix this. SOL-449
def test_prerequisite_course_save_successfully(self):
"""
Scenario: Selecting course from Pre-Requisite course drop down save the selected course as pre-requisite
......
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