Added IconsHelper and updated Keyboard to support require_inside flag
This commit is contained in:
23
tests/controls/test_icons_helper.py
Normal file
23
tests/controls/test_icons_helper.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from myfasthtml.controls.IconsHelper import IconsHelper
|
||||
|
||||
|
||||
def test_existing_icon():
|
||||
IconsHelper.reset()
|
||||
assert IconsHelper.get(True) is not None
|
||||
|
||||
|
||||
def test_dynamic_icon():
|
||||
IconsHelper.reset()
|
||||
assert IconsHelper.get("add20_filled") is not None
|
||||
|
||||
|
||||
def test_unknown_icon():
|
||||
IconsHelper.reset()
|
||||
assert IconsHelper.get("does_not_exist") is None
|
||||
|
||||
|
||||
|
||||
def test_dynamic_icon_by_package():
|
||||
IconsHelper.reset()
|
||||
assert IconsHelper.get("add20_filled", "fa") is None
|
||||
assert IconsHelper.get("add20_filled", "fluent") is not None
|
||||
Reference in New Issue
Block a user