Skip to content

Commit 37a9433

Browse files
Merge pull request #3866 from mariobuikhuizen/fix_restore_widgets_form_saved_state
fix: restoring widgets from saved state is broken since v8 in Lab
2 parents b253179 + d374291 commit 37a9433

File tree

8 files changed

+3
-2
lines changed

8 files changed

+3
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
pip install file://$PWD/python/ipywidgets#egg=ipywidgets[test]
9797
- name: Test with pytest
9898
run: |
99-
pip install pytest
99+
pip install "pytest<8"
100100
cd python/ipywidgets
101101
pytest --cov=ipywidgets ipywidgets
102102

python/jupyterlab_widgets/src/manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ export class WidgetManager extends LabWidgetManager {
496496
{ loadKernel, loadNotebook } = { loadKernel: true, loadNotebook: true }
497497
): Promise<void> {
498498
try {
499+
await this.context.sessionContext.ready;
499500
if (loadKernel) {
500501
try {
501502
this._kernelRestoreInProgress = true;

ui-tests/tests/widgets.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test.describe('Widget Visual Regression', () => {
4040

4141
for (let i = 0; i < cellCount; i++) {
4242
const image = `widgets-cell-${i}.png`;
43-
expect(captures[i]).toMatchSnapshot(image);
43+
expect.soft(captures[i]).toMatchSnapshot(image);
4444
}
4545
});
4646
});
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)