@@ -2,7 +2,7 @@ import { expect, test } from './fixtures'
22import path from 'path'
33import fs from 'fs-extra'
44import os from 'os'
5- import { openServerPage , runCommand , SUSHI_SOURCE_PATH } from './utils'
5+ import { openProblemsView , openServerPage , SUSHI_SOURCE_PATH } from './utils'
66import { createPythonInterpreterSettingsSpecifier } from './utils_code_server'
77import { execAsync } from '../src/utilities/exec'
88import yaml from 'yaml'
@@ -36,8 +36,7 @@ test('Workspace diagnostics show up in the diagnostics panel', async ({
3636 . locator ( 'a' )
3737 . click ( )
3838
39- // Open problems panel
40- await runCommand ( page , 'View: Focus Problems' )
39+ await openProblemsView ( page )
4140
4241 await page . waitForSelector ( 'text=problems' )
4342 await page . waitForSelector ( 'text=All models should have an owner' )
@@ -82,8 +81,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
8281 // Wait for the error to appear
8382 await page . waitForSelector ( 'text=Error creating context' )
8483
85- // Open the problems view
86- await runCommand ( page , 'View: Focus Problems' )
84+ await openProblemsView ( page )
8785
8886 // Asser that the error is present in the problems view
8987 await page
@@ -125,8 +123,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
125123 // Wait for the error to appear
126124 await page . waitForSelector ( 'text=Error creating context' )
127125
128- // Open the problems view
129- await runCommand ( page , 'View: Focus Problems' )
126+ await openProblemsView ( page )
130127
131128 // Asser that the error is present in the problems view
132129 await page
@@ -164,8 +161,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
164161 // Expect the error to appear
165162 await page . waitForSelector ( 'text=Error creating context' )
166163
167- // Open the problems view
168- await runCommand ( page , 'View: Focus Problems' )
164+ await openProblemsView ( page )
169165
170166 // Assert that the error is present in the problems view
171167 const errorElement = page
@@ -200,8 +196,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
200196 // Expect the error to appear
201197 await page . waitForSelector ( 'text=Error creating context' )
202198
203- // Open the problems view
204- await runCommand ( page , 'View: Focus Problems' )
199+ await openProblemsView ( page )
205200
206201 // Assert that the error is present in the problems view
207202 const errorElement = page . getByText ( 'Failed to load config file:' ) . first ( )
@@ -242,8 +237,7 @@ test.describe('Diagnostics for bad SQLMesh models', () => {
242237 // Wait for the error to appear
243238 await page . waitForSelector ( 'text=Error creating context' )
244239
245- // Open the problems view
246- await runCommand ( page , 'View: Focus Problems' )
240+ await openProblemsView ( page )
247241
248242 // Asser that the error is present in the problems view
249243 await page
@@ -284,8 +278,7 @@ test.describe('Diagnostics for bad SQLMesh models', () => {
284278 // Wait for the error to appear
285279 await page . waitForSelector ( 'text=Error creating context' )
286280
287- // Open the problems view
288- await runCommand ( page , 'View: Focus Problems' )
281+ await openProblemsView ( page )
289282
290283 // Assert error is present in the problems view
291284 const errorElement = page
@@ -331,8 +324,7 @@ test.describe('Diagnostics for bad audits', () => {
331324 // Wait for the error to appear
332325 await page . waitForSelector ( 'text=Error creating context' )
333326
334- // Open the problems view
335- await runCommand ( page , 'View: Focus Problems' )
327+ await openProblemsView ( page )
336328
337329 // Assert that the error is present in the problems view
338330 const errorElement = page
0 commit comments