Browse Source

add pytest

Falko Schindler 1 year ago
parent
commit
cf4e99d225
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tests/test_scene.py

+ 8 - 0
tests/test_scene.py

@@ -145,3 +145,11 @@ def test_clearing_scene(screen: Screen):
     screen.click('Clear')
     screen.wait(0.5)
     assert len(scene.objects) == 0
+
+
+def test_gltf(screen: Screen):
+    with ui.scene() as scene:
+        scene.gltf('https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/Box/glTF-Binary/Box.glb')
+
+    screen.open('/')
+    assert screen.selenium.execute_script(f'return scene_c{scene.id}.children.length') == 5