Skip to content

Commit b2fe576

Browse files
Add unit test of ui.separator
1 parent 0edf2d3 commit b2fe576

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_separator.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from nicegui import ui
2+
from nicegui.testing import Screen
3+
4+
5+
def test_separator(screen: Screen):
6+
@ui.page('/column')
7+
def index():
8+
with ui.column():
9+
ui.button('1')
10+
ui.separator()
11+
ui.button('2')
12+
@ui.page('/row')
13+
def index():
14+
with ui.row():
15+
ui.button('1')
16+
ui.separator().props('vertical')
17+
ui.button('2')
18+
19+
20+
screen.open('/column')
21+
assert screen.find_by_tag('hr').value_of_css_property('width') == '100%'
22+
23+
screen.wait(0.5)
24+
screen.open('/row')
25+
assert screen.find_by_tag('hr').value_of_css_property('width') == '1px'

0 commit comments

Comments
 (0)