use lurq::{app::Tree, core::Signal};

use crate::support::run_pass;

#[test]
fn empty_value_without_placeholder_is_still_layoutable() {
  let value = Signal::new(String::new());
  let mut runtime = Tree::new();

  runtime.set_root(lurq::components::TextInput::new(value));
  run_pass(&mut runtime);

  let root = runtime
    .find_element(|_| true)
    .expect("text input root should be layoutable");
  let rect = root.bounds();
  assert!(rect.width >= 0.0);
  assert!(rect.height >= 0.0);
}
