Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterbak committed Feb 27, 2023
1 parent fcf0109 commit 87467b3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def send_commands(self, command, other):
return MockResult()


def test_app():
def test_app_sargo():
page = ft.Page(conn=MockConn(), session_id=1)
# test if it would start up
main(page=page, test=True, test_config="sargo")
Expand All @@ -47,3 +47,18 @@ def test_app():
for _ in range(number_of_steps):
page.controls[0].to_next_view(None)
assert "SuccessView" in str(page.controls[0].view.controls[0])


def test_app_beyond2lte():
page = ft.Page(conn=MockConn(), session_id=1)
# test if it would start up
main(page=page, test=True, test_config="beyond2lte")

# test if you can go through all views
state = page.controls[0].state
state.load_config(device_code="sargo")
state.default_views.extend(state.addon_views)
number_of_steps = 14
for _ in range(number_of_steps):
page.controls[0].to_next_view(None)
assert "SuccessView" in str(page.controls[0].view.controls[0])

0 comments on commit 87467b3

Please sign in to comment.