@@ -157,18 +157,20 @@ def test_renders_form_state(self, env: Environment) -> None:
157157 query = "hello" ,
158158 doc_type = "fix" ,
159159 project = "cortex" ,
160+ project_names = ["cortex" , "artemis" ],
160161 )
161162 # Query input value reflects current search
162163 assert 'value="hello"' in html
163- # Project input value reflects filter
164- assert 'value="cortex"' in html
164+ # Project dropdown has selected option
165+ assert 'value="cortex" selected ' in html
165166 # selected option reflects doc_type
166167 assert 'value="fix" selected' in html
167168 assert "0 result(s)" in html
168169
169170 def test_renders_empty_state (self , env : Environment ) -> None :
170171 html = env .get_template ("documents.html" ).render (
171- documents = [], query = "" , doc_type = "" , project = ""
172+ documents = [], query = "" , doc_type = "" , project = "" ,
173+ project_names = [],
172174 )
173175 assert "No documents found." in html
174176
@@ -305,25 +307,24 @@ def test_renders_with_real_config_object(self, env: Environment, tmp_path: Path)
305307 log_level = "INFO" ,
306308 )
307309 html = env .get_template ("settings.html" ).render (
308- config = config , weights = {"recency" : 0.3 , "similarity" : 0.7 }
310+ config = config , weights = {}, msg = "" , msg_type = "info" ,
309311 )
310312 assert "127.0.0.1" in html
311313 assert "1314" in html
312314 assert "anthropic" in html
313315 assert "claude-opus-4-6" in html
314316 assert "all-MiniLM-L6-v2" in html
315317 assert "INFO" in html
316- assert "Recency" in html
317- assert "0.3" in html
318- assert "Similarity" in html
319- assert "0.7" in html
318+ assert "Import from Obsidian" in html
319+ assert "Export to Obsidian" in html
320320
321321 def test_renders_with_empty_weights (self , env : Environment , tmp_path : Path ) -> None :
322322 config = CortexConfig (data_dir = tmp_path )
323- html = env .get_template ("settings.html" ).render (config = config , weights = {})
324- # Must not crash when weights is empty
325- assert "Retrieval Weights" in html
323+ html = env .get_template ("settings.html" ).render (
324+ config = config , weights = {}, msg = "" , msg_type = "info" ,
325+ )
326326 assert "Configuration" in html
327+ assert "Import from Obsidian" in html
327328
328329
329330# ==========================================================================
0 commit comments