def test_service_list_route_service_endpoint_dropdown(live_server, sl_operator, service): # pylint: disable=unused-argument """service endpoint uris dropdown test""" sl_operator.get(url_for('storage.service_list_route', _external=True)) dt_rendered(sl_operator, 'service_list_table', service.comment) check_service_endpoint_dropdown( sl_operator, sl_operator.find_element_by_id('service_list_table'), service.port)
def test_note_view_route_service_endpoint_dropdown(live_server, sl_operator, note_factory, service): # pylint: disable=unused-argument """test note annotation from view route""" test_note = note_factory.create(service=service) sl_operator.get(url_for('storage.note_view_route', note_id=test_note.id, _external=True)) check_service_endpoint_dropdown( sl_operator, sl_operator.find_element_by_xpath('//td[contains(@class, "service_endpoint_dropdown")]'), f'<Service {test_note.service.id}: {test_note.service.proto}.{test_note.service.port}>' )
def test_vuln_list_route_service_endpoint_dropdown(live_server, sl_operator, vuln_factory, service): # pylint: disable=unused-argument """service endpoint uris dropdown test""" test_vuln = vuln_factory.create(service=service) sl_operator.get(url_for('storage.vuln_list_route', _external=True)) dt_rendered(sl_operator, 'vuln_list_table', test_vuln.comment) check_service_endpoint_dropdown( sl_operator, sl_operator.find_element_by_id('vuln_list_table'), f'{test_vuln.service.port}/{test_vuln.service.proto}')
def test_host_view_route_notes_list_service_endpoint_dropdown(live_server, sl_operator, note_factory, service): # pylint: disable=unused-argument """host view tabbed notes; SE dropdown""" test_note = note_factory.create(service=service) sl_operator.get(url_for('storage.host_view_route', host_id=test_note.host_id, _external=True)) switch_tab(sl_operator, 'notes', 'host_view_note_table', test_note.comment) check_service_endpoint_dropdown( sl_operator, sl_operator.find_element_by_id('host_view_note_table'), f'{test_note.service.port}/{test_note.service.proto}' )
def test_host_view_route_services_list_service_endpoint_dropdown(live_server, sl_operator, service): # pylint: disable=unused-argument """host view tabbed services; SE dropdown""" sl_operator.get(url_for('storage.host_view_route', host_id=service.host_id, _external=True)) switch_tab(sl_operator, 'services', 'host_view_service_table', service.comment) check_service_endpoint_dropdown(sl_operator, sl_operator.find_element_by_id('host_view_service_table'), service.port)