Skip to content

Commit

Permalink
tests: basic workspace tree functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Oct 15, 2024
1 parent e68e548 commit d987429
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_ui/test_workspace_tree.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from tests.test_ui.ui_base import run_pilot
from dooit.ui.tui import Dooit


async def workspaces_tree():
async with run_pilot() as pilot:
app = pilot.app
assert isinstance(app, Dooit)

wtree = app.workspace_tree

assert len(wtree._options) == 0

wtree.add_workspace()
wtree.add_workspace()
wtree.add_workspace()
w = wtree.add_workspace()

assert len(wtree._options) == 4

wtree.highlight_id(w)

assert wtree.highlighted == 3 # n-1

0 comments on commit d987429

Please sign in to comment.