Disabling the "View Unit in Studio" button to CCX courses
This commit is contained in:
@@ -40,3 +40,9 @@ class CoachDashboardPage(CoursePage):
|
||||
lambda: self.q(css=create_ccx_button).present, "Create a new Custom Course for edX"
|
||||
).fulfill()
|
||||
self.q(css=create_ccx_button).click()
|
||||
|
||||
def is_button_view_unit_in_studio_visible(self):
|
||||
"""
|
||||
check if the View Unit in Studio button is on the page
|
||||
"""
|
||||
return self.q(css='instructor-info-action').present
|
||||
|
||||
@@ -56,3 +56,7 @@ class CreateCCXCoachTest(EventsTestMixin, UniqueCourseTest):
|
||||
|
||||
# Assert that new ccx is created and we are on ccx dashboard/enrollment tab.
|
||||
self.assertTrue(self.coach_dashboard_page.is_browser_on_enrollment_page())
|
||||
|
||||
# Assert that the user cannot click in the "View Unit in Studio" button,
|
||||
# which means the user cannot edit the ccx course in studio
|
||||
self.assertFalse(self.coach_dashboard_page.is_button_view_unit_in_studio_visible())
|
||||
|
||||
Reference in New Issue
Block a user