Esempio n. 1
0
    def test_A_000009(self):
        """ Confirms that additional help on layer control can be
        accessed using the Zendesk widget
        """
        def oracle():
            """ A valid help center page is opened from the Zendesk
            widget, and the page contains the word "Layers"
            """
            self.assertIn('Help Center', TestSystem.title(driver))
            self.assertIn('Layer', TestSystem.title(driver))

        driver = self.driver
        Search.search_location(driver, 'San Diego')
        Search.search_location(driver, 'Amsterdam')
        num_windows_opened = len(driver.window_handles)
        Zendesk.to_help(driver, 'Layers', 'Using the Layer Control')
        External.switch_new_page(driver, num_windows_opened,
                                 ZendeskArticlePage.article_header_locator)
        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 test_A_000008(self):
        """ Confirms that map layer naming, as defined in the HydroClient
        user interface, is consistent with the Quick Start and help pages
        documentation
        """
        def oracle_1():
            """ Map layer naming in the Quick Start modal matches the
            naming within the HydroClient map search interface
            """
            for layer in layers:
                self.assertIn('<li>{}</li>'.format(layer),
                              TestSystem.page_source(driver))

        def oracle_2():
            """ Map layer naming in the help documentation page matches the
            naming within the HydroClient search interface
            """
            for layer in layers:
                self.assertIn(layer, TestSystem.page_source(driver))

        driver = self.driver
        layers = [
            'USGS Stream Gages', 'Nationalmap Hydrology', 'EPA Watersheds',
            'USGS LandCover 2011'
        ]
        for layer in layers:  # Turn all layer on
            Search.toggle_layer(driver, layer)
        for layer in layers:  # Turn all layers off
            Search.toggle_layer(driver, layer)
        Search.to_quickstart(driver)
        QuickStart.section(driver, 'Using the Layer Control')
        oracle_1()
        num_windows_opened = len(driver.window_handles)
        QuickStart.more(driver,
                        'Click for more information on the Layer Control')
        External.switch_new_page(driver, num_windows_opened,
                                 ZendeskArticlePage.article_header_locator)
        oracle_2()