fix(tests): remove bs4 dependency and unused imports (#3797)
This commit is contained in:
1 parent
a3c1647afb
commit
14c098e996
1 file changed
+6
-19
@@ -5,12 +5,8 @@ add/remove controls for tasks in the Kanban board detail view.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import json
|
||||
import re
|
||||
|
||||
import pytest
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
INDEX_HTML = (ROOT / "static" / "index.html").read_text(encoding="utf-8")
|
||||
PANELS_JS = (ROOT / "static" / "panels.js").read_text(encoding="utf-8")
|
||||
@@ -22,23 +18,14 @@ class TestKanbanWorkspaceSelector:
|
||||
|
||||
def test_modal_has_workspace_kind_dropdown(self):
|
||||
"""The modal must have a workspace kind dropdown with scratch, worktree, dir options."""
|
||||
soup = BeautifulSoup(INDEX_HTML, "html.parser")
|
||||
kind_select = soup.find("select", {"id": "kanbanTaskModalWorkspaceKind"})
|
||||
assert kind_select is not None, "Modal must have workspace kind dropdown"
|
||||
|
||||
options = [opt.get("value") for opt in kind_select.find_all("option")]
|
||||
assert "scratch" in options
|
||||
assert "worktree" in options
|
||||
assert "dir" in options
|
||||
assert 'id="kanbanTaskModalWorkspaceKind"' in INDEX_HTML
|
||||
for val in ("scratch", "worktree", "dir"):
|
||||
assert f'value="{val}"' in INDEX_HTML, f"Missing option value={val}"
|
||||
|
||||
def test_modal_has_workspace_path_input_row(self):
|
||||
"""The modal must have a workspace path input row, hidden by default."""
|
||||
soup = BeautifulSoup(INDEX_HTML, "html.parser")
|
||||
path_row = soup.find("div", {"id": "kanbanTaskModalWorkspacePathRow"})
|
||||
assert path_row is not None, "Modal must have workspace path row"
|
||||
|
||||
path_input = soup.find("input", {"id": "kanbanTaskModalWorkspacePath"})
|
||||
assert path_input is not None, "Modal must have workspace path input"
|
||||
"""The modal must have a workspace path input row."""
|
||||
assert 'id="kanbanTaskModalWorkspacePathRow"' in INDEX_HTML
|
||||
assert 'id="kanbanTaskModalWorkspacePath"' in INDEX_HTML
|
||||
|
||||
def test_workspace_path_row_visibility_toggle(self):
|
||||
"""The _kanbanOnWorkspaceKindChange function must control path row visibility."""
|
||||
|
||||
Reference in new issue
Block a user