Skip to content

Commit bea4382

Browse files
committed
add Slider tests
1 parent 7048481 commit bea4382

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

2.37 KB
Loading
2.61 KB
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import pytest
2+
3+
import flet as ft
4+
import flet.testing as ftt
5+
6+
7+
@pytest.mark.asyncio(loop_scope="module")
8+
async def test_basic(flet_app: ftt.FletTestApp, request):
9+
await flet_app.assert_control_screenshot(
10+
request.node.name,
11+
ft.Slider(value=0.3),
12+
)
13+
14+
15+
@pytest.mark.asyncio(loop_scope="module")
16+
async def test_range_and_label(flet_app: ftt.FletTestApp, request):
17+
await flet_app.assert_control_screenshot(
18+
request.node.name,
19+
ft.Slider(min=0, max=100, divisions=10, label="{value}%"),
20+
)

0 commit comments

Comments
 (0)