From 3c85de030d84dcc7607163bf9adb1a906e888679 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 11 Apr 2018 13:26:37 -0400 Subject: [PATCH] Wait for js to finish loading before trying to click on advanced settings --- cms/djangoapps/contentstore/features/advanced_settings.py | 2 ++ cms/static/js/base.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index 5125fac12f..bdef990623 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -17,6 +17,8 @@ DEPRECATED_SETTINGS = ["CSS Class for Course Reruns", "Hide Progress Tab", "XQA @step('I select the Advanced Settings$') def i_select_advanced_settings(step): + world.wait_for_js_to_load() + world.wait_for_js_variable_truthy('window.studioNavMenuActive') world.click_course_settings() # The click handlers are set up so that if you click diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 4ea35feda9..03c5ec8854 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -97,6 +97,8 @@ define([ }); dropdownMenuView.postRender(); } + + window.studioNavMenuActive = true; }); function smoothScrollLink(e) {