Skip to content

Commit 17a3149

Browse files
committed
fix the test_slider
1 parent 146128c commit 17a3149

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

panel/tests/ui/widgets/test_sliders.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -334,29 +334,17 @@ def test_slider_color_preserved_in_accordion(page, widget_cls):
334334

335335
serve_component(page, accordion)
336336

337-
wait_until(
338-
lambda: page.locator(".noUi-connect").count() > 0
339-
and page.locator(".noUi-connect").first.is_visible(),
340-
page,
341-
)
337+
page.locator(".noUi-target").first.wait_for(state="visible")
342338

343339
initial_color = page.evaluate(
344340
"() => getComputedStyle(document.querySelector('.noUi-connect')).backgroundColor"
345341
)
346342

347343
page.locator(".card-header").first.click()
348-
wait_until(
349-
lambda: page.locator(".noUi-connect").count() == 0
350-
or not page.locator(".noUi-connect").first.is_visible(),
351-
page,
352-
)
344+
page.locator(".noUi-target").first.wait_for(state="hidden")
353345

354346
page.locator(".card-header").first.click()
355-
wait_until(
356-
lambda: page.locator(".noUi-connect").count() > 0
357-
and page.locator(".noUi-connect").first.is_visible(),
358-
page,
359-
)
347+
page.locator(".noUi-target").first.wait_for(state="visible")
360348

361349
restored_color = page.evaluate(
362350
"() => getComputedStyle(document.querySelector('.noUi-connect')).backgroundColor"

0 commit comments

Comments
 (0)