# Path: sam/pages/settings_page.py
# def nice_name(s):
#     def __init__(self):
#     def get_available_importers():
#     def get_tags_preview(self):
#     def get_envs_preview(self):
#     def get_hosts_preview(self):
#     def GET(self):
# class SettingsPage(base.headed):


import os
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from sam.models.datasources import Datasources
from sam.models.links import Links
from sam.pages import settings_page
from spec.browser import conftest
""")
    assert f.check()

    # make sure the destination ds starts empty, and modal is hidden
    link_model.delete_connections()
    ends = link_model.get_all_endpoints()
    assert len(ends) == 0
    assert not conftest.modal_is_visible(upload_modal)

    # click upload
    btn_upload.click()
    assert conftest.modal_is_visible(upload_modal)
    # cancel, modal closes
    um_cancel.click()
    assert not conftest.modal_is_visible(upload_modal)
    btn_upload.click()
    assert conftest.modal_is_visible(upload_modal)
    # confirm without file, modal stays open
    um_confirm.click()
    assert conftest.modal_is_visible(upload_modal)

    # data sources represented:
    dd = conftest.get_semantic_dropdown_data(input_ds)
    dd = set([d[0] for d in dd])
    assert dd == set(map("ds{}".format, [conftest.ds, conftest.ds_short, conftest.ds_live]))
    # choose paloalto:
    browser.execute_script("""$("#log_format").parent().dropdown("set selected", "import_paloalto");""")
    assert browser.find_element_by_id("log_format").get_attribute("value") == "import_paloalto"

    # log formats represented:

# Path: sam/pages/settings_page.py
# def nice_name(s):
#     def __init__(self):
#     def get_available_importers():
#     def get_tags_preview(self):
#     def get_envs_preview(self):
#     def get_hosts_preview(self):
#     def GET(self):
# class SettingsPage(base.headed):


# Path: spec/browser/test_settings.py
import os
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from sam.models.datasources import Datasources
from sam.models.links import Links
from sam.pages import settings_page
from spec.browser import conftest

""")
    assert f.check()

    # make sure the destination ds starts empty, and modal is hidden
    link_model.delete_connections()
    ends = link_model.get_all_endpoints()
    assert len(ends) == 0
    assert not conftest.modal_is_visible(upload_modal)

    # click upload
    btn_upload.click()
    assert conftest.modal_is_visible(upload_modal)
    # cancel, modal closes
    um_cancel.click()
    assert not conftest.modal_is_visible(upload_modal)
    btn_upload.click()
    assert conftest.modal_is_visible(upload_modal)
    # confirm without file, modal stays open
    um_confirm.click()
    assert conftest.modal_is_visible(upload_modal)

    # data sources represented:
    dd = conftest.get_semantic_dropdown_data(input_ds)
    dd = set([d[0] for d in dd])
    assert dd == set(map("ds{}".format, [conftest.ds, conftest.ds_short, conftest.ds_live]))
    # choose paloalto:
    browser.execute_script("""$("#log_format").parent().dropdown("set selected", "import_paloalto");""")
    assert browser.find_element_by_id("log_format").get_attribute("value") == "import_paloalto"

    # log formats represented:

    expected = settings_page.SettingsPage.get_available_importers()