class LibraryHelpTest(StudioLibraryTest): """ Test help links on a Library page. """ def setUp(self): super(LibraryHelpTest, self).setUp() self.library_page = LibraryPage(self.browser, self.library_key) self.library_user_page = LibraryUsersPage(self.browser, self.library_key) def test_library_content_side_bar_help(self): """ Scenario: Help link in sidebar links is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Learn more about content libraries' in the sidebar links Then Help link should open. And help url should be correct """ self.library_page.visit() expected_url = _get_expected_documentation_url( '/course_components/libraries.html') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.library_page, href=expected_url, help_text='Learn more about content libraries') def test_library_user_access_setting_nav_help(self): """ Scenario: Help link in navigation bar is working on 'User Access' settings page of library. Given that I am on the 'User Access' settings page of library. And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should be correct. """ self.library_user_page.visit() expected_url = _get_expected_documentation_url( '/course_components/libraries.html#give-other-users-access-to-your-library' ) # Assert that help link is correct. assert_nav_help_link( test=self, page=self.library_user_page, href=expected_url, )
class LibraryHelpTest(StudioLibraryTest): """ Test help links on a Library page. """ def setUp(self): super(LibraryHelpTest, self).setUp() self.library_page = LibraryPage(self.browser, self.library_key) self.library_user_page = LibraryUsersPage(self.browser, self.library_key) def test_library_content_side_bar_help(self): """ Scenario: Help link in sidebar links is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Learn more about content libraries' in the sidebar links Then Help link should open. And help url should be correct """ self.library_page.visit() expected_url = _get_expected_documentation_url('/course_components/libraries.html') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.library_page, href=expected_url, help_text='Learn more about content libraries' ) def test_library_user_access_setting_nav_help(self): """ Scenario: Help link in navigation bar is working on 'User Access' settings page of library. Given that I am on the 'User Access' settings page of library. And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should be correct. """ self.library_user_page.visit() expected_url = _get_expected_documentation_url( '/course_components/libraries.html#give-other-users-access-to-your-library' ) # Assert that help link is correct. assert_nav_help_link( test=self, page=self.library_user_page, href=expected_url, )
class LibraryHelpTest(StudioLibraryTest): """ Test help links on a Library page. """ def setUp(self): super(LibraryHelpTest, self).setUp() self.library_page = LibraryPage(self.browser, self.library_key) self.library_user_page = LibraryUsersPage(self.browser, self.library_key) def test_library_content_nav_help(self): """ Scenario: Help link in navigation bar is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'course/components/libraries.html' """ self.library_page.visit() # The href we want to see in anchor help element. href = "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/" \ "en/latest/course_components/libraries.html" # Assert that help link is correct. assert_nav_help_link(test=self, page=self.library_page, href=href) def test_library_content_side_bar_help(self): """ Scenario: Help link in sidebar links is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Learn more about content libraries' in the sidebar links Then Help link should open. And help url should end with 'course/components/libraries.html' """ self.library_page.visit() # The href we want to see in anchor help element. href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \ 'en/latest/course_components/libraries.html' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.library_page, href=href, help_text='Learn more about content libraries') def test_library_user_access_setting_nav_help(self): """ Scenario: Help link in navigation bar is working on 'User Access' settings page of library. Given that I am on the 'User Access' settings page of library. And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'creating_content/libraries.html#give-other-users-access-to-your-library' """ self.library_user_page.visit() # The href we want to see in anchor help element. href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'latest/course_components/libraries.html#give-other-users-access-to-your-library' # Assert that help link is correct. assert_nav_help_link(test=self, page=self.library_user_page, href=href)
class LibraryHelpTest(StudioLibraryTest): """ Test help links on a Library page. """ def setUp(self): super(LibraryHelpTest, self).setUp() self.library_page = LibraryPage(self.browser, self.library_key) self.library_user_page = LibraryUsersPage(self.browser, self.library_key) def test_library_content_nav_help(self): """ Scenario: Help link in navigation bar is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'course/components/libraries.html' """ self.library_page.visit() # The href we want to see in anchor help element. href = "http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/" \ "en/open-release-ficus.master/course_components/libraries.html" # Assert that help link is correct. assert_nav_help_link( test=self, page=self.library_page, href=href ) def test_library_content_side_bar_help(self): """ Scenario: Help link in sidebar links is working on content library page(click a library on the Library list page). Given that I am on the content library page(click a library on the Library list page). And I want help about the process And I click the 'Learn more about content libraries' in the sidebar links Then Help link should open. And help url should end with 'course/components/libraries.html' """ self.library_page.visit() # The href we want to see in anchor help element. href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \ 'en/open-release-ficus.master/course_components/libraries.html' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.library_page, href=href, help_text='Learn more about content libraries' ) def test_library_user_access_setting_nav_help(self): """ Scenario: Help link in navigation bar is working on 'User Access' settings page of library. Given that I am on the 'User Access' settings page of library. And I want help about the process And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'creating_content/libraries.html#give-other-users-access-to-your-library' """ self.library_user_page.visit() # The href we want to see in anchor help element. href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/' \ 'open-release-ficus.master/course_components/libraries.html#give-other-users-access-to-your-library' # Assert that help link is correct. assert_nav_help_link( test=self, page=self.library_user_page, href=href )