55
66
77@pytest .mark .asyncio (loop_scope = "module" )
8- async def test_elevated_button_basic (flet_app : ftt .FletTestApp , request ):
8+ async def test_basic (flet_app : ftt .FletTestApp , request ):
99 flet_app .page .theme_mode = ft .ThemeMode .LIGHT
1010 await flet_app .assert_control_screenshot (
1111 request .node .name ,
@@ -32,3 +32,44 @@ async def test_issue_5538(flet_app: ftt.FletTestApp, request):
3232 ]
3333 ),
3434 )
35+
36+
37+ @pytest .mark .asyncio (loop_scope = "module" )
38+ async def test_button_style (flet_app : ftt .FletTestApp , request ):
39+ flet_app .page .theme_mode = ft .ThemeMode .LIGHT
40+ await flet_app .assert_control_screenshot (
41+ request .node .name ,
42+ ft .ElevatedButton (
43+ content = "Test Button" ,
44+ style = ft .ButtonStyle (
45+ bgcolor = ft .Colors .BLUE ,
46+ shape = ft .RoundedRectangleBorder (radius = 10 ),
47+ side = ft .BorderSide (width = 3 , color = ft .Colors .YELLOW ),
48+ padding = ft .Padding .all (20 ),
49+ text_style = ft .TextStyle (
50+ size = 15 ,
51+ weight = ft .FontWeight .BOLD ,
52+ color = ft .Colors .WHITE ,
53+ ),
54+ ),
55+ ),
56+ )
57+
58+
59+ @pytest .mark .asyncio (loop_scope = "module" )
60+ async def test_button_style_conflicts (flet_app : ftt .FletTestApp , request ):
61+ flet_app .page .theme_mode = ft .ThemeMode .LIGHT
62+ await flet_app .assert_control_screenshot (
63+ request .node .name ,
64+ ft .ElevatedButton (
65+ content = "Test Button" ,
66+ elevation = 10 ,
67+ color = ft .Colors .BLACK ,
68+ bgcolor = ft .Colors .BLUE ,
69+ style = ft .ButtonStyle (
70+ elevation = 2 ,
71+ color = ft .Colors .WHITE ,
72+ bgcolor = ft .Colors .RED ,
73+ ),
74+ ),
75+ )
0 commit comments