Skip to content

Commit 6080bbb

Browse files
authored
test: Bump test-ui Python version (#8163)
1 parent abad856 commit 6080bbb

7 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ env:
3535
DISPLAY: ":99.0"
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
COV: "--cov=./panel --cov-report=xml --cov-append"
38+
LANG: en_US.UTF-8
39+
LC_ALL: en_US.UTF-8
3840

3941
jobs:
4042
pre_commit:

panel/models/perspective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'pro', 'pro-dark', 'gruvbox', 'gruvbox-dark',
1515
]
1616

17-
PERSPECTIVE_VERSION = '3.6.1'
17+
PERSPECTIVE_VERSION = '3.7.4'
1818

1919
THEME_PATH = f"@finos/perspective-viewer@{PERSPECTIVE_VERSION}/dist/css/"
2020
THEME_URL = f"{config.npm_cdn}/{THEME_PATH}"

panel/tests/ui/layout/test_column.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_column_scroll_position_init(page):
203203
# assert scroll position can be used to initialize scroll location
204204
column = page.locator('.bk-panel-models-layout-Column')
205205
expect(column).to_be_attached()
206-
expect(column).to_have_js_property('scrollTop', 100)
206+
wait_until(lambda: column.evaluate('(el) => el.scrollTop') == 100, page)
207207

208208

209209
def test_column_scroll_position_recorded(page):

panel/tests/ui/pane/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_png_stretch_both(embed, page):
116116
def test_svg_native_size(embed, page):
117117
svg = SVG(SVG_FILE, embed=embed)
118118
bbox = get_bbox(page, svg)
119-
assert_allclose(bbox['width'], 507.21, atol=0.01)
119+
assert_allclose(bbox['width'], 507.21, atol=0.05)
120120
assert int(bbox['height']) == 427
121121

122122
@pytest.mark.parametrize('embed', [False, True])

panel/tests/ui/template/test_fastlisttemplate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def test_fast_list_template_no_console_errors(page):
2626
"Websocket connection 0 is now open",
2727
"document idle at",
2828
"items were rendered successfully",
29+
"Automatic fallback to software WebGL has been deprecated",
2930
]
3031
assert len([
3132
msg for msg in msgs if not any(known in msg.text for known in known_messages)

panel/tests/util.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def wait_until(fn, page=None, timeout=5000, interval=100):
161161
# Hide this function traceback from the pytest output if the test fails
162162
__tracebackhide__ = True
163163

164+
if page:
165+
page.wait_for_load_state('networkidle')
166+
164167
start = time.time()
165168

166169
def timed_out():
@@ -230,6 +233,9 @@ async def async_wait_until(fn, page=None, timeout=5000, interval=100):
230233
# Hide this function traceback from the pytest output if the test fails
231234
__tracebackhide__ = True
232235

236+
if page:
237+
await page.wait_for_load_state('networkidle')
238+
233239
start = time.time()
234240

235241
def timed_out():
@@ -315,6 +321,7 @@ def serve_and_wait(app, page=None, prefix=None, port=None, proxy=None, **kwargs)
315321
wait_for_server(port, prefix=prefix)
316322
if page:
317323
page.wait_for_function("document.readyState === 'complete'", timeout=5000)
324+
page.wait_for_load_state('networkidle')
318325
return port
319326

320327
serve_and_wait.server_implementation = 'tornado'
@@ -330,6 +337,7 @@ def serve_component(page, app, suffix='', wait=True, **kwargs):
330337

331338
if page and wait:
332339
page.wait_for_function("document.readyState === 'complete'", timeout=5000)
340+
page.wait_for_load_state('networkidle')
333341
return msgs, port
334342

335343

pixi.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test-310 = ["py310", "test-core", "test", "example", "test-example", "test-unit-
1515
test-311 = ["py311", "test-core", "test", "example", "test-example", "test-unit-task"]
1616
test-312 = ["py312", "test-core", "test", "example", "test-example", "test-unit-task"]
1717
test-313 = ["py313", "test-core", "test", "example", "test-example", "test-unit-task"]
18-
test-ui = ["py312", "test-core", "test", "test-ui"]
18+
test-ui = ["py313", "test-core", "test", "test-ui"]
1919
test-core = ["py313", "test-core", "test-unit-task"]
2020
test-bokeh37 = ["py310", "test-core", "test-unit-task", "bokeh37"]
2121
test-type = ["py311", "type", "example", "test"]
@@ -168,7 +168,7 @@ nbval = "*"
168168
channels = ["microsoft"]
169169

170170
[feature.test-ui.dependencies]
171-
playwright = { version = "!=1.51.0", channel = "microsoft" } # https://github.com/microsoft/playwright-python/issues/2791
171+
playwright = { version = "*", channel = "microsoft" }
172172
pytest-playwright = { version = "*", channel = "microsoft" }
173173
pytest-asyncio = "*"
174174
jupyter_server = "*"

0 commit comments

Comments
 (0)