@@ -358,4 +358,46 @@ test.describe('Bad config.py/config.yaml file issues', () => {
358358 . first ( )
359359 . isVisible ( { timeout : 5_000 } )
360360 } )
361+
362+ test ( 'sushi example, correct python, bad config' , async ( {
363+ page,
364+ sharedCodeServer,
365+ } ) => {
366+ const tempDir = await fs . mkdtemp (
367+ path . join ( os . tmpdir ( ) , 'vscode-test-tcloud-' ) ,
368+ )
369+ await fs . copy ( SUSHI_SOURCE_PATH , tempDir )
370+ await createPythonInterpreterSettingsSpecifier ( tempDir )
371+
372+ const configPyPath = path . join ( tempDir , 'config.py' )
373+ // Write an invalid Python to config.py
374+ await fs . writeFile ( configPyPath , 'config = {}' )
375+
376+ await page . goto (
377+ `http://127.0.1:${ sharedCodeServer . codeServerPort } /?folder=${ tempDir } ` ,
378+ )
379+ await page . waitForLoadState ( 'networkidle' )
380+
381+ // Open customers.sql model
382+ await page
383+ . getByRole ( 'treeitem' , { name : 'models' , exact : true } )
384+ . locator ( 'a' )
385+ . click ( )
386+ await page
387+ . getByRole ( 'treeitem' , { name : 'customers.sql' , exact : true } )
388+ . locator ( 'a' )
389+ . click ( )
390+
391+ // Expect the error to appear
392+ await page . waitForSelector ( 'text=Error creating context' )
393+
394+ // Open the problems view
395+ await runCommand ( page , 'View: Focus Problems' )
396+
397+ // Assert that the error is present in the problems view
398+ await page
399+ . getByText ( 'Config needs to be a valid object of type' )
400+ . first ( )
401+ . isVisible ( { timeout : 5_000 } )
402+ } )
361403} )
0 commit comments