class HomeHelpTest(StudioCourseTest): """ Tests help links on 'Home'(Courses tab) page. """ def setUp(self): # pylint: disable=arguments-differ super(HomeHelpTest, self).setUp() self.home_page = HomePage(self.browser) self.home_page.visit() def test_course_home_nav_help(self): """ Scenario: Help link in navigation bar is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'getting_started/get_started.html' """ # 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/getting_started/get_started.html' # Assert that help link is correct. assert_nav_help_link( test=self, page=self.home_page, href=href ) def test_course_home_side_bar_help(self): """ Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Getting Started with edX Studio' in the sidebar links Then Help link should open. And help url should end with 'getting_started/get_started.html' """ # 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/getting_started/get_started.html' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.home_page, href=href, help_text='Getting Started with edX Studio', as_list_item=True )
class HomeHelpTest(StudioCourseTest): """ Tests help links on 'Home'(Courses tab) page. """ def setUp(self): # pylint: disable=arguments-differ super(HomeHelpTest, self).setUp() self.home_page = HomePage(self.browser) self.home_page.visit() def test_course_home_nav_help(self): """ Scenario: Help link in navigation bar is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Help' in the navigation bar Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url('/get_started.html') # Assert that help link is correct. assert_nav_help_link( test=self, page=self.home_page, href=expected_url ) def test_course_home_side_bar_help(self): """ Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Getting Started with edX Studio' in the sidebar links Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url('/get_started.html') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.home_page, href=expected_url, help_text='Getting Started with edX Studio', as_list_item=True )
class HomeHelpTest(StudioCourseTest): """ Tests help links on 'Home'(Courses tab) page. """ def setUp(self): # pylint: disable=arguments-differ super(HomeHelpTest, self).setUp() self.home_page = HomePage(self.browser) self.home_page.visit() def test_course_home_nav_help(self): """ Scenario: Help link in navigation bar is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Help' in the navigation bar Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url('/getting_started/CA_get_started_Studio.html') # Assert that help link is correct. assert_nav_help_link( test=self, page=self.home_page, href=expected_url ) def test_course_home_side_bar_help(self): """ Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Getting Started with edX Studio' in the sidebar links Then Help link should open. And help url should be correct """ expected_url = _get_expected_documentation_url('/getting_started/CA_get_started_Studio.html') # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.home_page, href=expected_url, help_text='Getting Started with edX Studio', as_list_item=True )
class LoggedInPagesTest(AcceptanceTest): """ Verify the pages in Studio that you can get to when logged in and do not have a course yet. """ def setUp(self): super(LoggedInPagesTest, self).setUp() self.auth_page = AutoAuthPage(self.browser, staff=True) self.dashboard_page = DashboardPage(self.browser) self.home_page = HomePage(self.browser) def test_logged_in_no_courses(self): """ Make sure that you can get to the dashboard and home pages without a course. """ self.auth_page.visit() self.dashboard_page.visit() self.home_page.visit()
class LoggedInPagesTest(AcceptanceTest): """ Verify the pages in Studio that you can get to when logged in and do not have a course yet. """ def setUp(self): super(LoggedInPagesTest, self).setUp() self.auth_page = AutoAuthPage(self.browser, staff=True) self.dashboard_page = DashboardPage(self.browser) self.home_page = HomePage(self.browser) def test_logged_in_no_courses(self): """ Make sure that you can get to the dashboard and home pages without a course. """ self.auth_page.visit() self.dashboard_page.visit() self.home_page.visit()
class HomeHelpTest(StudioCourseTest): """ Tests help links on 'Home'(Courses tab) page. """ def setUp(self): # pylint: disable=arguments-differ super(HomeHelpTest, self).setUp() self.home_page = HomePage(self.browser) self.home_page.visit() def test_course_home_nav_help(self): """ Scenario: Help link in navigation bar is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Help' in the navigation bar Then Help link should open. And help url should end with 'getting_started/get_started.html' """ # 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/getting_started/get_started.html' # Assert that help link is correct. assert_nav_help_link(test=self, page=self.home_page, href=href) def test_course_home_side_bar_help(self): """ Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page. Given that I am on the 'Home'(Courses tab) page. And I want help about the courses And I click the 'Getting Started with Edraak Studio' in the sidebar links Then Help link should open. And help url should end with 'getting_started/get_started.html' """ # 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/getting_started/get_started.html' # Assert that help link is correct. assert_side_bar_help_link( test=self, page=self.home_page, href=href, help_text='Getting Started with Edraak Studio', as_list_item=True)