Merge pull request #3428 from edx/zoldak/fix-lang-test

Wait for ajax post after changing language
This commit is contained in:
Jay Zoldak
2014-04-22 15:13:44 -04:00

View File

@@ -78,6 +78,10 @@ class DashboardPage(PageObject):
self.q(css='select[name="language"] option[value="{}"]'.format(code)).first.click()
self.q(css="#submit-lang").first.click()
# Clicking the submit-lang button does a jquery ajax post, so make sure that
# has completed before continuing on.
self.wait_for_ajax()
self._changed_lang_promise(code).fulfill()
def _changed_lang_promise(self, code):