"""AUTO-GENERATED by scripts/codegen.py — DO NOT EDIT."""
from __future__ import annotations

import pytest
from zuzu.runtime.spec import _components, _reset


@pytest.fixture(autouse=True)
def _clean():
    _reset()
    yield
    _reset()


def test_badge_spec_type():
    from zuzu.components._generated.display import badge
    badge('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "badge"

def test_card_spec_type():
    from zuzu.components._generated.display import card
    card('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "card"

def test_chart_spec_type():
    from zuzu.components._generated.display import chart
    chart([{"id": 1}], x='test', y='test')
    assert len(_components) == 1
    assert _components[0]["type"] == "chart"

def test_countdown_spec_type():
    from zuzu.components._generated.display import countdown
    countdown('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "countdown"

def test_embed_spec_type():
    from zuzu.components._generated.display import embed
    embed('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "embed"

def test_gauge_spec_type():
    from zuzu.components._generated.display import gauge
    gauge(1)
    assert len(_components) == 1
    assert _components[0]["type"] == "gauge"

def test_grid_spec_type():
    from zuzu.components._generated.display import grid
    grid([{"id": 1}])
    assert len(_components) == 1
    assert _components[0]["type"] == "grid"

def test_hint_spec_type():
    from zuzu.components._generated.display import hint
    hint('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "hint"

def test_image_spec_type():
    from zuzu.components._generated.display import image
    image('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "image"

def test_list_spec_type():
    from zuzu.components._generated.display import list
    list([{"id": 1}])
    assert len(_components) == 1
    assert _components[0]["type"] == "list"

def test_metric_spec_type():
    from zuzu.components._generated.display import metric
    metric('test', "")
    assert len(_components) == 1
    assert _components[0]["type"] == "metric"

def test_progress_spec_type():
    from zuzu.components._generated.display import progress
    progress(1)
    assert len(_components) == 1
    assert _components[0]["type"] == "progress"

def test_richtext_spec_type():
    from zuzu.components._generated.display import richtext
    richtext('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "richtext"

def test_text_spec_type():
    from zuzu.components._generated.display import text
    text('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "text"

def test_title_spec_type():
    from zuzu.components._generated.display import title
    title('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "title"

def test_checkbox_spec_type():
    from zuzu.components._generated.input import checkbox
    result = checkbox('test')
    assert result["type"] == "checkbox"

def test_date_input_spec_type():
    from zuzu.components._generated.input import date_input
    result = date_input('test')
    assert result["type"] == "date_input"

def test_datetime_input_spec_type():
    from zuzu.components._generated.input import datetime_input
    result = datetime_input('test')
    assert result["type"] == "datetime_input"

def test_file_input_spec_type():
    from zuzu.components._generated.input import file_input
    result = file_input('test')
    assert result["type"] == "file_input"

def test_image_input_spec_type():
    from zuzu.components._generated.input import image_input
    result = image_input('test')
    assert result["type"] == "image_input"

def test_markdown_input_spec_type():
    from zuzu.components._generated.input import markdown_input
    result = markdown_input('test')
    assert result["type"] == "markdown_input"

def test_number_input_spec_type():
    from zuzu.components._generated.input import number_input
    result = number_input('test')
    assert result["type"] == "number_input"

def test_select_spec_type():
    from zuzu.components._generated.input import select
    result = select('test', options=[])
    assert result["type"] == "select"

def test_slider_spec_type():
    from zuzu.components._generated.input import slider
    result = slider('test')
    assert result["type"] == "slider"

def test_switch_spec_type():
    from zuzu.components._generated.input import switch
    result = switch('test')
    assert result["type"] == "switch"

def test_text_input_spec_type():
    from zuzu.components._generated.input import text_input
    result = text_input('test')
    assert result["type"] == "text_input"

def test_time_input_spec_type():
    from zuzu.components._generated.input import time_input
    result = time_input('test')
    assert result["type"] == "time_input"

def test_action_row_spec_type():
    from zuzu.components._generated.action import action_row
    action_row('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "action_row"

def test_alert_spec_type():
    from zuzu.components._generated.action import alert
    alert('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "alert"

def test_button_spec_type():
    from zuzu.components._generated.action import button
    button('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "button"

def test_fab_spec_type():
    from zuzu.components._generated.action import fab
    fab()
    assert len(_components) == 1
    assert _components[0]["type"] == "fab"

def test_go_to_spec_type():
    from zuzu.components._generated.action import go_to
    go_to('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "navigate"

def test_link_spec_type():
    from zuzu.components._generated.action import link
    link('test', 'test')
    assert len(_components) == 1
    assert _components[0]["type"] == "link"

def test_columns_spec_type():
    from zuzu.components._generated.layout import columns
    columns()
    assert len(_components) == 1
    assert _components[0]["type"] == "columns"

def test_section_spec_type():
    from zuzu.components._generated.layout import section
    section('test')
    assert len(_components) == 1
    assert _components[0]["type"] == "section"

def test_separator_spec_type():
    from zuzu.components._generated.layout import separator
    separator()
    assert len(_components) == 1
    assert _components[0]["type"] == "separator"

def test_tabs_spec_type():
    from zuzu.components._generated.layout import tabs
    tabs([])
    assert len(_components) == 1
    assert _components[0]["type"] == "tabs"

