瀏覽代碼

add pytest

Falko Schindler 1 年之前
父節點
當前提交
cf4e99d225
共有 1 個文件被更改,包括 8 次插入0 次删除
  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.click('Clear')
     screen.wait(0.5)
     screen.wait(0.5)
     assert len(scene.objects) == 0
     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