|
@@ -7,14 +7,15 @@ from nicegui.testing import Screen
|
|
|
|
|
|
|
|
|
|
def test_number_input(screen: Screen):
|
|
def test_number_input(screen: Screen):
|
|
- ui.number('Number')
|
|
|
|
|
|
+ ui.number('Number', value=42)
|
|
ui.button('Button')
|
|
ui.button('Button')
|
|
|
|
|
|
screen.open('/')
|
|
screen.open('/')
|
|
|
|
+ screen.should_contain_input('42')
|
|
element = screen.selenium.find_element(By.XPATH, '//*[@aria-label="Number"]')
|
|
element = screen.selenium.find_element(By.XPATH, '//*[@aria-label="Number"]')
|
|
- element.send_keys('42')
|
|
|
|
|
|
+ element.send_keys('00')
|
|
screen.click('Button')
|
|
screen.click('Button')
|
|
- screen.should_contain_input('42')
|
|
|
|
|
|
+ screen.should_contain_input('4200')
|
|
|
|
|
|
|
|
|
|
def test_apply_format_on_blur(screen: Screen):
|
|
def test_apply_format_on_blur(screen: Screen):
|