Skip to content

Commit 57f1841

Browse files
committed
NavigationBar test
1 parent 3a37c18 commit 57f1841

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
12.9 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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_navigation_bar(flet_app: ftt.FletTestApp, request):
9+
flet_app.page.theme_mode = ft.ThemeMode.LIGHT
10+
await flet_app.assert_control_screenshot(
11+
request.node.name,
12+
ft.NavigationBar(
13+
destinations=[
14+
ft.NavigationBarDestination(icon=ft.Icons.EXPLORE, label="Explore"),
15+
ft.NavigationBarDestination(icon=ft.Icons.COMMUTE, label="Commute"),
16+
ft.NavigationBarDestination(
17+
icon=ft.Icons.BOOKMARK_BORDER,
18+
selected_icon=ft.Icons.BOOKMARK,
19+
label="Favorites",
20+
),
21+
]
22+
),
23+
)

0 commit comments

Comments
 (0)