TNL-6929:
Improves navigation within Studio for Learning Sequences, speeding up authors who want to see how a learner progresses through content without needing to jump over to the LMS. This adds a dropdown section navigator to the breadcrumbs on the unit page and copies the sequence navigator from LMS to the studio unit page.
This commit is contained in:
@@ -9,7 +9,7 @@ from bok_choy.promise import EmptyPromise, Promise
|
||||
|
||||
from common.test.acceptance.pages.common.utils import click_css, confirm_prompt
|
||||
from common.test.acceptance.pages.studio import BASE_URL
|
||||
from common.test.acceptance.pages.studio.utils import HelpMixin, type_in_codemirror
|
||||
from common.test.acceptance.pages.studio.utils import HelpMixin, set_input_value_and_save, type_in_codemirror
|
||||
from common.test.acceptance.tests.helpers import click_and_wait_for_window
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ class ContainerPage(PageObject, HelpMixin):
|
||||
Container page in Studio
|
||||
"""
|
||||
NAME_SELECTOR = '.page-header-title'
|
||||
NAME_INPUT_SELECTOR = '.page-header .xblock-field-input'
|
||||
NAME_FIELD_WRAPPER_SELECTOR = '.page-header .wrapper-xblock-field'
|
||||
NAME_INPUT_SELECTOR = '.wrapper-xblock-field .xblock-field-input'
|
||||
NAME_FIELD_WRAPPER_SELECTOR = '.wrapper-xblock-field'
|
||||
ADD_MISSING_GROUPS_SELECTOR = '.notification-action-button[data-notification-action="add-missing-groups"]'
|
||||
|
||||
def __init__(self, browser, locator):
|
||||
@@ -410,6 +410,13 @@ class ContainerPage(PageObject, HelpMixin):
|
||||
)
|
||||
return self.q(css=css).html
|
||||
|
||||
def set_name(self, name):
|
||||
"""
|
||||
Set the name of the unit.
|
||||
"""
|
||||
set_input_value_and_save(self, self.NAME_INPUT_SELECTOR, name)
|
||||
self.wait_for_ajax()
|
||||
|
||||
|
||||
class XBlockWrapper(PageObject):
|
||||
"""
|
||||
|
||||
@@ -33,7 +33,7 @@ class CourseOutlineItem(object):
|
||||
NAME_SELECTOR = '.item-title'
|
||||
NAME_INPUT_SELECTOR = '.xblock-field-input'
|
||||
NAME_FIELD_WRAPPER_SELECTOR = '.xblock-title .wrapper-xblock-field'
|
||||
STATUS_MESSAGE_SELECTOR = '> div[class$="status"] .status-message'
|
||||
STATUS_MESSAGE_SELECTOR = '> div[class$="-status"] .status-messages'
|
||||
CONFIGURATION_BUTTON_SELECTOR = '.action-item .configure-button'
|
||||
|
||||
def __repr__(self):
|
||||
@@ -84,7 +84,8 @@ class CourseOutlineItem(object):
|
||||
"""
|
||||
Returns the status message of this item.
|
||||
"""
|
||||
return self.q(css=self._bounded_selector(self.STATUS_MESSAGE_SELECTOR)).text[0] # pylint: disable=no-member
|
||||
selector = self._bounded_selector(self.STATUS_MESSAGE_SELECTOR)
|
||||
return self.q(css=selector).text[0] # pylint: disable=no-member
|
||||
|
||||
@property
|
||||
def has_staff_lock_warning(self):
|
||||
|
||||
@@ -88,14 +88,10 @@ class GradingPage(SettingsPage):
|
||||
Drag and drop grade range.
|
||||
"""
|
||||
self.wait_for_element_visibility(self.grade_ranges, "Grades ranges are visible")
|
||||
# We have used jquery here to adjust the width of slider to
|
||||
# desired range because drag and drop has behaved very inconsistently.
|
||||
# This does not updates the text of range on the slider.
|
||||
# So as a work around, we have used drag_and_drop without any offset
|
||||
self.browser.execute_script('$(".ui-resizable").css("width","10")')
|
||||
action = ActionChains(self.browser)
|
||||
moveable_css = self.q(css='.ui-resizable-e').results[0]
|
||||
action.drag_and_drop_by_offset(moveable_css, 0, 0).perform()
|
||||
action.drag_and_drop_by_offset(moveable_css, -280, 0)
|
||||
action.perform()
|
||||
|
||||
@property
|
||||
def get_assignment_names(self):
|
||||
|
||||
@@ -340,6 +340,7 @@ class WarningMessagesTest(CourseOutlineTest):
|
||||
subsection.add_unit()
|
||||
unit = ContainerPage(self.browser, None)
|
||||
unit.wait_for_page()
|
||||
unit.set_name(name)
|
||||
|
||||
if unit.is_staff_locked != unit_state.is_locked:
|
||||
unit.toggle_staff_lock()
|
||||
|
||||
Reference in New Issue
Block a user