Merge pull request #986 from manaflow-ai/task-remove-doc-text-tests
Remove invalid docs text inspection tests
This commit is contained in:
commit
3abec0552e
2 changed files with 0 additions and 69 deletions
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Regression checks for cmux-browser get selector examples."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from cmux import cmuxError
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
COMMANDS = ROOT / "skills/cmux-browser/references/commands.md"
|
||||
|
||||
|
||||
def _must(cond: bool, msg: str) -> None:
|
||||
if not cond:
|
||||
raise cmuxError(msg)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
commands = COMMANDS.read_text(encoding="utf-8")
|
||||
|
||||
_must("`agent-browser get text <ref>` -> `cmux browser <surface> get text <ref-or-selector>`" in commands, "Expected get text mapping to mention selector support")
|
||||
_must("cmux browser <surface> get text body" in commands, "Expected get text body example")
|
||||
_must("cmux browser <surface> get html body" in commands, "Expected get html body example")
|
||||
_must('cmux browser <surface> get value "#email"' in commands, "Expected get value selector example")
|
||||
_must('cmux browser <surface> get attr "#email" --attr placeholder' in commands, "Expected get attr selector example")
|
||||
_must("cmux browser <surface> get text|html|value|attr|count|box|styles ..." not in commands, "Unexpected bare get example block")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Regression checks for cmux-browser js_error troubleshooting docs."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
from cmux import cmuxError
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SKILL = ROOT / "skills/cmux-browser/SKILL.md"
|
||||
|
||||
|
||||
def _must(cond: bool, msg: str) -> None:
|
||||
if not cond:
|
||||
raise cmuxError(msg)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
skill = SKILL.read_text(encoding="utf-8")
|
||||
|
||||
_must("## Troubleshooting" in skill, "Expected Troubleshooting section in cmux-browser skill")
|
||||
_must("### `js_error` on `snapshot --interactive` or `eval`" in skill, "Expected js_error troubleshooting heading")
|
||||
_must("cmux browser surface:7 get url" in skill, "Expected get url recovery step")
|
||||
_must("cmux browser surface:7 get text body" in skill, "Expected get text body recovery step")
|
||||
_must("cmux browser surface:7 get html body" in skill, "Expected get html body recovery step")
|
||||
_must("when `snapshot --interactive` or `eval` returns `js_error`" in skill, "Expected js_error fallback guidance")
|
||||
_must("navigate to a simpler intermediate page" in skill, "Expected simpler-page fallback guidance")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue