@@ -2,7 +2,7 @@ import { expect, test } from './fixtures'
22import path from 'path'
33import fs from 'fs-extra'
44import os from 'os'
5- import { runCommand , SUSHI_SOURCE_PATH } from './utils'
5+ import { openProblemsView , SUSHI_SOURCE_PATH } from './utils'
66import { createPythonInterpreterSettingsSpecifier } from './utils_code_server'
77import { execAsync } from '../src/utilities/exec'
88import yaml from 'yaml'
@@ -39,8 +39,7 @@ test('Workspace diagnostics show up in the diagnostics panel', async ({
3939 . locator ( 'a' )
4040 . click ( )
4141
42- // Open problems panel
43- await runCommand ( page , 'View: Focus Problems' )
42+ await openProblemsView ( page )
4443
4544 await page . waitForSelector ( 'text=problems' )
4645 await page . waitForSelector ( 'text=All models should have an owner' )
@@ -88,8 +87,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
8887 // Wait for the error to appear
8988 await page . waitForSelector ( 'text=Error creating context' )
9089
91- // Open the problems view
92- await runCommand ( page , 'View: Focus Problems' )
90+ await openProblemsView ( page )
9391
9492 // Asser that the error is present in the problems view
9593 await page
@@ -134,8 +132,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
134132 // Wait for the error to appear
135133 await page . waitForSelector ( 'text=Error creating context' )
136134
137- // Open the problems view
138- await runCommand ( page , 'View: Focus Problems' )
135+ await openProblemsView ( page )
139136
140137 // Asser that the error is present in the problems view
141138 await page
@@ -176,8 +173,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
176173 // Expect the error to appear
177174 await page . waitForSelector ( 'text=Error creating context' )
178175
179- // Open the problems view
180- await runCommand ( page , 'View: Focus Problems' )
176+ await openProblemsView ( page )
181177
182178 // Assert that the error is present in the problems view
183179 const errorElement = page
@@ -215,8 +211,7 @@ test.describe('Bad config.py/config.yaml file issues', () => {
215211 // Expect the error to appear
216212 await page . waitForSelector ( 'text=Error creating context' )
217213
218- // Open the problems view
219- await runCommand ( page , 'View: Focus Problems' )
214+ await openProblemsView ( page )
220215
221216 // Assert that the error is present in the problems view
222217 const errorElement = page . getByText ( 'Failed to load config file:' ) . first ( )
@@ -260,8 +255,7 @@ test.describe('Diagnostics for bad SQLMesh models', () => {
260255 // Wait for the error to appear
261256 await page . waitForSelector ( 'text=Error creating context' )
262257
263- // Open the problems view
264- await runCommand ( page , 'View: Focus Problems' )
258+ await openProblemsView ( page )
265259
266260 // Asser that the error is present in the problems view
267261 await page
@@ -302,8 +296,7 @@ test.describe('Diagnostics for bad SQLMesh models', () => {
302296 // Wait for the error to appear
303297 await page . waitForSelector ( 'text=Error creating context' )
304298
305- // Open the problems view
306- await runCommand ( page , 'View: Focus Problems' )
299+ await openProblemsView ( page )
307300
308301 // Assert error is present in the problems view
309302 const errorElement = page
@@ -352,8 +345,7 @@ test.describe('Diagnostics for bad audits', () => {
352345 // Wait for the error to appear
353346 await page . waitForSelector ( 'text=Error creating context' )
354347
355- // Open the problems view
356- await runCommand ( page , 'View: Focus Problems' )
348+ await openProblemsView ( page )
357349
358350 // Assert that the error is present in the problems view
359351 const errorElement = page
0 commit comments