Skip to content

Commit 4a1737e

Browse files
committed
Tests: Rename PRIVACY_BUTTON to PRIVACY_BUTTON_CLASS_NAME
To be consistent with other global variables
1 parent 338c8eb commit 4a1737e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_widgets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_setup_globals():
157157
# fmt: off
158158
global BUTTON_CLASS_NAME, OUTPUT_CLASS_NAME, TEXT_INPUT_CLASS_NAME, \
159159
CODE_MIRROR_CLASS_NAME, MATPLOTLIB_CANVAS_CLASS_NAME, CUE_BOX_CLASS_NAME, \
160-
PRIVACY_BUTTON
160+
PRIVACY_BUTTON_CLASS_NAME
161161
global CUED_CUE_BOX_CLASS_NAME, RESET_CUE_BUTTON_CLASS_NAME, \
162162
CUED_RESET_CUE_BUTTON_CLASS_NAME
163163
# fmt: on
@@ -176,7 +176,7 @@ def test_setup_globals():
176176
"lm-Widget.lm-Panel.jupyter-widgets.widget-container"
177177
".widget-box.widget-vbox.scwidget-cue-box"
178178
)
179-
PRIVACY_BUTTON = "bp3-button.bp3-small.jp-toast-button.jp-Button"
179+
PRIVACY_BUTTON_CLASS_NAME = "bp3-button.bp3-small.jp-toast-button.jp-Button"
180180
elif JUPYTER_TYPE == "lab" and JUPYTER_VERSION < Version("4.0.0"):
181181
BUTTON_CLASS_NAME = (
182182
"lm-Widget.p-Widget.jupyter-widgets.jupyter-button.widget-button"
@@ -194,7 +194,7 @@ def test_setup_globals():
194194
"lm-Widget.p-Widget.lm-Panel.p-Panel.jupyter-widgets."
195195
"widget-container.widget-box.widget-vbox.scwidget-cue-box"
196196
)
197-
PRIVACY_BUTTON = "bp3-button.bp3-small.jp-toast-button.jp-Button"
197+
PRIVACY_BUTTON_CLASS_NAME = "bp3-button.bp3-small.jp-toast-button.jp-Button"
198198
elif JUPYTER_TYPE == "lab" and JUPYTER_VERSION >= Version("4.0.0"):
199199
BUTTON_CLASS_NAME = "lm-Widget.jupyter-widgets.jupyter-button.widget-button"
200200
OUTPUT_CLASS_NAME = (
@@ -211,7 +211,7 @@ def test_setup_globals():
211211
"lm-Widget.lm-Panel.jupyter-widgets.widget-container."
212212
"widget-box.widget-vbox.scwidget-cue-box"
213213
)
214-
PRIVACY_BUTTON = "jp-toast-button.jp-mod-small.jp-Button"
214+
PRIVACY_BUTTON_CLASS_NAME = "jp-toast-button.jp-mod-small.jp-Button"
215215
else:
216216
raise ValueError(
217217
f"Tests do not support jupyter type {JUPYTER_TYPE!r} for version"
@@ -237,7 +237,7 @@ def test_privacy_policy(selenium_driver):
237237
driver = selenium_driver("tests/notebooks/widget_answers.ipynb")
238238
# we search for the button to appear so we can be sure that the privacy window
239239
# appeared
240-
privacy_buttons = driver.find_elements(By.CLASS_NAME, PRIVACY_BUTTON)
240+
privacy_buttons = driver.find_elements(By.CLASS_NAME, PRIVACY_BUTTON_CLASS_NAME)
241241
yes_button = None
242242
for button in privacy_buttons:
243243
if button.text == "Yes":

0 commit comments

Comments
 (0)