test_responsive.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from reflex.components.core.responsive import (
  2. desktop_only,
  3. mobile_and_tablet,
  4. mobile_only,
  5. tablet_and_desktop,
  6. tablet_only,
  7. )
  8. from reflex.components.radix.themes.layout.box import Box
  9. def test_mobile_only():
  10. """Test the mobile_only responsive component."""
  11. component = mobile_only("Content")
  12. assert isinstance(component, Box)
  13. def test_tablet_only():
  14. """Test the tablet_only responsive component."""
  15. component = tablet_only("Content")
  16. assert isinstance(component, Box)
  17. def test_desktop_only():
  18. """Test the desktop_only responsive component."""
  19. component = desktop_only("Content")
  20. assert isinstance(component, Box)
  21. def test_tablet_and_desktop():
  22. """Test the tablet_and_desktop responsive component."""
  23. component = tablet_and_desktop("Content")
  24. assert isinstance(component, Box)
  25. def test_mobile_and_tablet():
  26. """Test the mobile_and_tablet responsive component."""
  27. component = mobile_and_tablet("Content")
  28. assert isinstance(component, Box)