瀏覽代碼

test auto-index page

Rodja Trappe 2 年之前
父節點
當前提交
6de7e1d372
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      tests/test_pages.py

+ 12 - 0
tests/test_pages.py

@@ -21,6 +21,18 @@ async def test_route_with_custom_path(user: User):
     user.should_see('page with custom path')
 
 
+async def test_auto_index_page_with_link_to_subpage(user: User):
+    ui.link('link to subpage', '/subpage')
+
+    @ui.page('/subpage')
+    def page():
+        ui.label('the subpage')
+
+    user.open()
+    user.click('link to subpage')
+    user.should_see('the subpage')
+
+
 async def test_link_to_page_by_passing_function(user: User):
     @ui.page('/subpage')
     def page():