@@ -24,7 +24,7 @@ test.describe('Environment Editor', () => {
2424 await page . getByRole ( 'row' , { name : 'New Environment' } ) . waitFor ( { state : 'visible' } ) ;
2525 await page . getByRole ( 'row' , { name : 'New Environment' } ) . click ( ) ;
2626 await page . getByRole ( 'dialog' ) . getByRole ( 'button' , { name : 'Close' } ) . click ( ) ;
27-
27+
2828 // wait for the Manage Environments dialog to close before interacting with the picker
2929 await page . getByRole ( 'heading' , { name : 'Manage Environments' } ) . waitFor ( { state : 'hidden' } ) ;
3030
@@ -35,7 +35,7 @@ test.describe('Environment Editor', () => {
3535 // send request: verify variables fall back to base env (new env is empty)
3636 await insomnia . navigationSidebar . clickRequestOrFolder ( 'New Request' ) ;
3737 await page . getByRole ( 'button' , { name : 'Send' } ) . click ( ) ;
38-
38+
3939 // wait for a response before switching to console
4040 await page . locator ( '[data-testid="response-status-tag"]:visible' ) . waitFor ( { state : 'visible' , timeout : 25_000 } ) ;
4141 await page . getByRole ( 'tab' , { name : 'Console' } ) . click ( ) ;
@@ -91,7 +91,7 @@ test.describe('Environment Editor', () => {
9191
9292 // blur the editor before closing so the debounce flush is triggered by the button's mousedown
9393 await dialog . getByRole ( 'button' , { name : 'Close' } ) . click ( ) ;
94-
94+
9595 // wait for the Manage Environments dialog to fully close before navigating
9696 await page . getByRole ( 'heading' , { name : 'Manage Environments' } ) . waitFor ( { state : 'hidden' } ) ;
9797 await page . getByLabel ( 'Manage collection environments' ) . press ( 'Escape' ) ;
@@ -166,14 +166,14 @@ test.describe('Environment Editor', () => {
166166 await page . getByRole ( 'menuitemradio' , { name : 'JSON' } ) . click ( ) ;
167167 await waitForSync ( ) ;
168168 await secondRow . getByRole ( 'button' , { name : 'Edit JSON' } ) . click ( ) ;
169-
169+
170170 // wait for the JSON modal before typing
171171 await page . getByRole ( 'dialog' ) . getByTestId ( 'CodeEditor' ) . waitFor ( { state : 'visible' } ) ;
172172 const bodyEditor = page . getByRole ( 'dialog' ) . getByTestId ( 'CodeEditor' ) . getByRole ( 'textbox' ) ;
173173 await bodyEditor . focus ( ) ;
174174 await page . keyboard . press ( 'ControlOrMeta+a' ) ;
175175 await page . keyboard . type ( '{"anotherString":"kvAnotherStr","anotherNumber": 12345}' ) ;
176-
176+
177177 // submit and wait for the JSON modal to fully close before proceeding
178178 await page . getByRole ( 'button' , { name : 'Modal Submit' } ) . click ( ) ;
179179 await page . getByRole ( 'dialog' , { name : 'Modal' } ) . waitFor ( { state : 'hidden' } ) ;
@@ -186,7 +186,9 @@ test.describe('Environment Editor', () => {
186186 // dismiss the environment picker dropdown if it appeared
187187 await page . locator ( 'body' ) . click ( ) ;
188188 try {
189- await page . getByRole ( 'listbox' , { name : 'Select a Collection Environment' } ) . waitFor ( { state : 'hidden' , timeout : 3000 } ) ;
189+ await page
190+ . getByRole ( 'listbox' , { name : 'Select a Collection Environment' } )
191+ . waitFor ( { state : 'hidden' , timeout : 3000 } ) ;
190192 } catch {
191193 await page . keyboard . press ( 'Escape' ) ;
192194 }
@@ -245,7 +247,9 @@ test.describe('Environment Editor', () => {
245247 // dismiss the environment picker dropdown if it appeared
246248 await page . locator ( 'body' ) . click ( ) ;
247249 try {
248- await page . getByRole ( 'listbox' , { name : 'Select a Collection Environment' } ) . waitFor ( { state : 'hidden' , timeout : 3000 } ) ;
250+ await page
251+ . getByRole ( 'listbox' , { name : 'Select a Collection Environment' } )
252+ . waitFor ( { state : 'hidden' , timeout : 3000 } ) ;
249253 } catch {
250254 await page . keyboard . press ( 'Escape' ) ;
251255 }
@@ -290,6 +294,8 @@ test.describe('Environment Editor', () => {
290294 await page . getByLabel ( 'Add Project Environment' ) . click ( ) ;
291295 await page . getByPlaceholder ( 'Enter a name for your Environment' ) . fill ( 'My New Project Env' ) ;
292296 await page . getByRole ( 'button' , { name : 'Create' , exact : true } ) . click ( ) ;
297+ await expect . soft ( insomnia . navigationSidebar . workspaceRow ( 'My New Project Env' ) ) . toBeVisible ( ) ;
298+ await insomnia . pressEscape ( ) ;
293299
294300 // creating navigates into the new environment's own page; go back to the collection
295301 await insomnia . navigationSidebar . selectWorkspace ( 'My first collection' ) ;
@@ -300,7 +306,9 @@ test.describe('Environment Editor', () => {
300306 await expect . soft ( page . getByRole ( 'option' , { name : 'My New Project Env' } ) ) . toBeVisible ( ) ;
301307 } ) ;
302308
303- test ( 'Add Sub Environment and Add Private Sub Environment create environments with the correct privacy' , async ( { page } ) => {
309+ test ( 'Add Sub Environment and Add Private Sub Environment create environments with the correct privacy' , async ( {
310+ page,
311+ } ) => {
304312 await page . getByRole ( 'button' , { name : 'Create request collection' , exact : true } ) . click ( ) ;
305313
306314 await page . getByLabel ( 'Select a Collection Environment' ) . click ( ) ;
0 commit comments