소스 검색

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():