Esempio n. 1
0
    def test_A_000011(self):
        """ Confirms "About" modal dropdown links successfully open up
        the associated resource in a new tab and do not show a 404 Error
        """
        def oracle():
            """ None of the resource pages contain the text "404 Error" """
            self.assertNotIn('404 Error',
                             external_sources,
                             msg='"{}" page was not found.'.format(page))

        driver = self.driver

        page = 'Help Center'
        for to_helpcenter_link in [About.to_helpcenter, About.to_contact]:
            to_helpcenter_link(driver)
            external_sources = External.source_new_page(driver)
            External.close_new_page(driver)
            oracle()
        About.contact_close(driver)

        page = 'CUAHSI GitHub repository'
        # opens in new window
        About.to_license_repo_top(driver)
        external_sources = External.source_new_page(driver)
        External.close_new_page(driver)
        oracle()
        About.licensing_close(driver)
        # opens in the same window
        About.to_license_repo_inline(driver)
        external_sources = External.source_new_page(driver)
        # TODO Brian fix of _blank target inconsistency in the works
        # External.close_new_page(driver)
        oracle()
Esempio n. 2
0
    def test_B_000007(self):
        """ Confirms all apps have an associated resource page which is
        correctly linked and correctly listed within the app info on the
        apps page
        """
        def oracle(app_name, resource_page):
            self.assertIn(app_name, resource_page)

        driver = self.driver
        num_windows_now = len(driver.window_handles)
        Home.to_apps(driver)
        External.switch_new_page(driver, num_windows_now,
                                 AppsPage.apps_container_locator)
        apps_count = Apps.count(driver)
        for i in range(0, apps_count):  # +1 used below - xpath start at 1
            app_name = Apps.get_title(driver, i + 1)
            Apps.show_info(driver, i + 1)
            Apps.to_resource(driver, i + 1)
            oracle(app_name, External.source_new_page(driver))
            TestSystem.back(driver)
Esempio n. 3
0
 def oracle_viewer_opened():
     """ The Data Series viewer application initializes and the data table
     near the bottom of the application is loaded """
     self.assertIn('id="stat_div"',
                   External.source_new_page(self.driver))