File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,3 +82,16 @@ def test_folder_invalid_namespace(page: Page):
8282 expect (
8383 page .locator ('text=Page name "Folder/Page2/Main Page" is in namespace "Page2" that does not exist.' )
8484 ).to_be_visible ()
85+
86+
87+ def test_folder_category_no_crash (page : Page ):
88+ """Check that accessing Folder/Category doesn't cause an IndexError crash."""
89+ page .goto ("http://localhost:8080/Folder/Category" )
90+
91+ # Before the fix, this would crash with an IndexError when page_get_language
92+ # tried to access page.split("/")[2] on ["Folder", "Category"].
93+ # After the fix, it should show an appropriate error message.
94+ # Since Category is a namespace, it should show the namespace error message.
95+ expect (
96+ page .locator ('text=Page name "Folder/Category/Main Page" is in namespace "Category" that does not exist.' )
97+ ).to_be_visible ()
You can’t perform that action at this time.
0 commit comments