From 07bf0873ae59090a188642c22bacdc9f7d63815d Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 25 Sep 2026 13:43:03 -0700 Subject: [PATCH] fix desktop environments test --- desktop/src/tests/routes/environments.test.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/desktop/src/tests/routes/environments.test.tsx b/desktop/src/tests/routes/environments.test.tsx index 126414619dc..1f29459af8c 100644 --- a/desktop/src/tests/routes/environments.test.tsx +++ b/desktop/src/tests/routes/environments.test.tsx @@ -237,12 +237,11 @@ describe('EnvironmentsPage', () => { }); it('starts Jupyter Lab for an environment', async () => { - // Mock localStorage to return the correct extension for the environment mockLocalStorage.getItem.mockImplementation((key) => { if (key === 'environments-first-load-done') return 'true'; if (key === 'env-extensions-cache') { return JSON.stringify({ - 'test-env': [{ package: 'notebook', version: '7.0.0' }] + 'test-env': { extensions: [{ package: 'notebook', version: '7.0.0' }], pythonVersion: '3.10' } }); } return null; @@ -282,12 +281,11 @@ describe('EnvironmentsPage', () => { }); it('stops Jupyter server for an environment', async () => { - // Mock localStorage to return the correct extension for the environment mockLocalStorage.getItem.mockImplementation((key) => { if (key === 'environments-first-load-done') return 'true'; if (key === 'env-extensions-cache') { return JSON.stringify({ - 'test-env': [{ package: 'jupyter', version: '1.0.0' }] + 'test-env': { extensions: [{ package: 'jupyter', version: '1.0.0' }], pythonVersion: '3.10' } }); } return null; @@ -331,13 +329,11 @@ describe('EnvironmentsPage', () => { }); it('views Jupyter logs for an environment', async () => { - // Mock localStorage to return the correct extension for the environment mockLocalStorage.getItem.mockImplementation((key) => { if (key === 'environments-first-load-done') return 'true'; if (key === 'env-extensions-cache') { - // This must match what your component expects for hasJupyterSupport return JSON.stringify({ - 'test-env': [{ package: 'jupyter', version: '1.0.0' }] + 'test-env': { extensions: [{ package: 'jupyter', version: '1.0.0' }], pythonVersion: '3.10' } }); } return null;