from nest_ui import App


def test_section_adds_widgets():
    app = App()
    window = app.create_window("Test")
    section = window.create_section("Main")
    section.add_stat("CPU", "20%")
    section.add_key_value("Mode", "default")
    section.add_paragraph("Ready", "yes")
    assert len(section.widgets) == 3
