def test_A_000019(self): """ Confirm empty operations on the filter modals don't affect the results set or the persistance of the searchbox entry """ def oracle_search_text_is_same(text): """ Check if the text is the same in the search field """ self.assertEqual(Search.get_searchbox_text(self.driver), text) def oracle_result(init_result): """ Compare search results count to the initial level """ self.assertEqual(init_result, Search.count_results(self.driver)) location = "NUIO üł. 54343nt, 342sf 234sdf, 12..." # deliberately random Search.search_location(self.driver, location) Search.search(self.driver) init_result_count = Search.count_results(self.driver) Services.filters(self.driver) # apply no services filters Keywords.empty_keywords(self.driver) # no keyword filters Advanced.empty_advanced(self.driver) # no advanced filters Search.search(self.driver) oracle_result(init_result_count) oracle_search_text_is_same(location) Search.reset(self.driver) Search.search(self.driver) oracle_result(init_result_count) oracle_search_text_is_same(location)
def test_A_000003(self): """ Confirms repeated search for Lake Annie data does not result in problematic behavior """ def oracle(): """ 51 results are returned for a Lake Annie Florida data search, when the search is filtered to only include "Archbold Biological Center" service """ self.assertIn('51', Search.count_results(self.driver)) Search.search_location(self.driver, 'Lake Annie Highlands County') Services.filters(self.driver, orgs='Archbold Biological Station') Search.search(self.driver, 60) oracle()
def test_A_000002(self): """ Confirms Archbold service metadata is available through HydroClient and that a sample of the data downloads successfully """ def oracle(): """ The Lake Annie Florida data can be successfully sent to the workspace, and then is processed successfully in the workspace ("completed" status) """ self.assertEqual(Workspace.count_complete(self.driver), 1) Search.search_location(self.driver, 'Lake Annie Highlands County') Services.filters(self.driver, orgs='Archbold Biological Station') Filter.open(self.driver) Filter.to_workspace_cell(self.driver, 1, 1) oracle()
def test_A_000014(self): """ Confirms NLDAS data is not available over the ocean (from either of the two services) """ def oracle(): """ The results count over Cape Cod Bay (no land in view) is 0 after filtering for only NLDAS services """ self.assertEqual(Search.count_results(self.driver), '0') Search.search_location(self.driver, 'Cape Cod Bay') Search.zoom_in(self.driver, 3) Services.filters(self.driver, titles=[ 'NLDAS Hourly NOAH Data', 'NLDAS Hourly Primary Forcing Data' ]) oracle()
def test_A_000021(self): """" Confirm the Data Series Viewer application can't be sent more than 10 time series records """ def oracle(): """ Checks that the Launch Tool is disabled """ self.assertTrue(Workspace.launch_is_disabled(self.driver)) Search.search_location(self.driver, "Panama City, Pana") Search.search(self.driver) Services.filters(self.driver, non_gridded_only=True) Search.search(self.driver) Filter.open(self.driver) Filter.show_25(self.driver) Filter.to_workspace_all(self.driver) Workspace.select_all(self.driver) Workspace.to_viewer(self.driver) TestSystem.wait(10) oracle()
def test_A_000004(self): """ Confirms the start and end date in a NWIS Unit Values data search are applied throughout search and workspace export workflow """ def oracle(): """ Start date and end date in workspace match the initial date filtering values established in the Search interface """ self.assertTrue( Workspace.is_in_results(self.driver, ['2015-12-01', '2015-12-30'], 10)) Search.search_location(self.driver, 'Tampa ') Services.filters(self.driver, titles='NWIS Unit Values') Search.filter_dates(self.driver, '12/01/2015', '12/30/2015') Filter.open(self.driver) Filter.to_workspace_text(self.driver, 'Derived Value') oracle()
def test_A_000005(self): """ Confirms metadata and data availability for the NASA Goddard Earth Sciences services, using the New Haven CT Site X416-Y130. The two associated services are NLDAS Hourly NOAH Data and NLDAS Hourly Primary Forcing Data """ def oracle(): """ The time series are sent to the workspace and processed, resulting in a "completed" status for all time series """ self.assertEqual(Workspace.count_complete(self.driver, 6), 3) Search.search_location(self.driver, 'New Haven ') Services.filters(self.driver, titles=[ 'NLDAS Hourly NOAH Data', 'NLDAS Hourly Primary Forcing Data' ]) Filter.open(self.driver) Filter.search_field(self.driver, 'X416-Y130') Filter.to_workspace_cell_multi(self.driver, [1, 5, 9]) # rows 1, 5, 9 oracle()
def test_A_000022(self): """ Confirm data series export to the Resource Creator app can be executed successfully """ def oracle_completion_count(): """ Returned results set from Trinidad is not too large """ self.assertLess(Workspace.count_complete(self.driver), 5) def oracle_resource_creator_up(): """ Resource creator seems to be functioning """ self.assertTrue(ResourceCreator.is_initialized(self.driver)) Search.search_location(self.driver, "Trinidad, Trinidad and Tobago") Search.search(self.driver) Services.search(self.driver, "World War", result_num=1) Search.search(self.driver) Filter.open(self.driver) Filter.to_workspace_all(self.driver) oracle_completion_count() Workspace.select_all(self.driver) Workspace.to_hydroshare(self.driver) num_windows_opened = len(self.driver.window_handles) Workspace.launch_tool(self.driver) External.to_file(self.driver, num_windows_opened, "HydroShare") ResourceCreator.create_resource(self.driver)