diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 17feee7ab4..997ce41cdb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -96,7 +96,7 @@ jobs: pip install file://$PWD/python/ipywidgets#egg=ipywidgets[test] - name: Test with pytest run: | - pip install pytest + pip install "pytest<8" cd python/ipywidgets pytest --cov=ipywidgets ipywidgets diff --git a/python/jupyterlab_widgets/src/manager.ts b/python/jupyterlab_widgets/src/manager.ts index 9ee14d76fc..fec2cb3e4e 100644 --- a/python/jupyterlab_widgets/src/manager.ts +++ b/python/jupyterlab_widgets/src/manager.ts @@ -496,6 +496,7 @@ export class WidgetManager extends LabWidgetManager { { loadKernel, loadNotebook } = { loadKernel: true, loadNotebook: true } ): Promise { try { + await this.context.sessionContext.ready; if (loadKernel) { try { this._kernelRestoreInProgress = true; diff --git a/ui-tests/tests/widgets.test.ts b/ui-tests/tests/widgets.test.ts index 9943840bd7..fff3d44555 100644 --- a/ui-tests/tests/widgets.test.ts +++ b/ui-tests/tests/widgets.test.ts @@ -40,7 +40,7 @@ test.describe('Widget Visual Regression', () => { for (let i = 0; i < cellCount; i++) { const image = `widgets-cell-${i}.png`; - expect(captures[i]).toMatchSnapshot(image); + expect.soft(captures[i]).toMatchSnapshot(image); } }); }); diff --git a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-40-linux.png b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-40-linux.png index 55f4ca06b0..3174f7d2bd 100644 Binary files a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-40-linux.png and b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-40-linux.png differ diff --git a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-41-linux.png b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-41-linux.png index 56fbf41053..10ca2304e6 100644 Binary files a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-41-linux.png and b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-41-linux.png differ diff --git a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-42-linux.png b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-42-linux.png index 3ba7823af2..ababc4c03b 100644 Binary files a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-42-linux.png and b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-42-linux.png differ diff --git a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-43-linux.png b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-43-linux.png index 0a8ff39463..f3dbb59270 100644 Binary files a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-43-linux.png and b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-43-linux.png differ diff --git a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-44-linux.png b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-44-linux.png index 510c9ae08f..8a4fd4ec09 100644 Binary files a/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-44-linux.png and b/ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-44-linux.png differ