File tree 2 files changed +24
-2
lines changed
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,10 @@ def _selenium_driver(nb_path):
115
115
"Restart Kernel and Run All Cells…"
116
116
)
117
117
else :
118
- raise ValueError ("jupyter lab > 4.0.0 is not supported." )
118
+ restart_kernel_button_class_name = "jp-ToolbarButtonComponent"
119
+ restart_kernel_button_title_attribute = (
120
+ "Restart the kernel and run all cells"
121
+ )
119
122
elif JUPYTER_TYPE == "notebook" :
120
123
if get_jupyter_version () < Version ("7.0.0" ):
121
124
restart_kernel_button_class_name = "btn.btn-default"
@@ -176,7 +179,10 @@ def _selenium_driver(nb_path):
176
179
)
177
180
restart_button_text = "Restart"
178
181
else :
179
- raise ValueError ("jupyter lab > 4.0.0 is not supported." )
182
+ restart_button_class_name = (
183
+ "jp-Dialog-button.jp-mod-accept.jp-mod-warn.jp-mod-styled"
184
+ )
185
+ restart_button_text = "Restart"
180
186
elif JUPYTER_TYPE == "notebook" :
181
187
if get_jupyter_version () < Version ("7.0.0" ):
182
188
restart_button_class_name = "btn.btn-default.btn-sm.btn-danger"
Original file line number Diff line number Diff line change @@ -160,6 +160,22 @@ def test_setup_globals():
160
160
"lm-Widget.p-Widget.lm-Panel.p-Panel.jupyter-widgets."
161
161
"widget-container.widget-box.widget-vbox.scwidget-cue-box"
162
162
)
163
+ elif JUPYTER_TYPE == "lab" and JUPYTER_VERSION >= Version ("4.0.0" ):
164
+ BUTTON_CLASS_NAME = "lm-Widget.jupyter-widgets.jupyter-button.widget-button"
165
+ OUTPUT_CLASS_NAME = (
166
+ "lm-Widget.jp-RenderedText.jp-mod-trusted.jp-OutputArea-output"
167
+ )
168
+
169
+ TEXT_INPUT_CLASS_NAME = "widget-input"
170
+ CODE_MIRROR_CLASS_NAME = "cm-content"
171
+
172
+ MATPLOTLIB_CANVAS_CLASS_NAME = (
173
+ "jupyter-widgets.jupyter-matplotlib-canvas-container"
174
+ )
175
+ CUE_BOX_CLASS_NAME = (
176
+ "lm-Widget.lm-Panel.jupyter-widgets.widget-container."
177
+ "widget-box.widget-vbox.scwidget-cue-box"
178
+ )
163
179
else :
164
180
raise ValueError (
165
181
f"Tests do not support jupyter type { JUPYTER_TYPE !r} for version"
You can’t perform that action at this time.
0 commit comments