Skip to content

Commit

Permalink
Merge pull request #3866 from mariobuikhuizen/fix_restore_widgets_for…
Browse files Browse the repository at this point in the history
…m_saved_state

fix: restoring widgets from saved state is broken since v8 in Lab
  • Loading branch information
maartenbreddels committed Feb 8, 2024
2 parents b253179 + d374291 commit 37a9433
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions python/jupyterlab_widgets/src/manager.ts
Expand Up @@ -496,6 +496,7 @@ export class WidgetManager extends LabWidgetManager {
{ loadKernel, loadNotebook } = { loadKernel: true, loadNotebook: true }
): Promise<void> {
try {
await this.context.sessionContext.ready;
if (loadKernel) {
try {
this._kernelRestoreInProgress = true;
Expand Down
2 changes: 1 addition & 1 deletion ui-tests/tests/widgets.test.ts
Expand Up @@ -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);
}
});
});
Binary file modified ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-40-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-41-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-42-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-43-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/widgets.test.ts-snapshots/widgets-cell-44-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 37a9433

Please sign in to comment.