Files
meshcore-bot/tests/test_contacts_frontend.py
T
agessaman 092be2d5bf feat(contacts): implement pagination, search, and sorting for contacts API
- Enhanced the `/api/contacts` endpoint to support pagination, allowing users to specify `page` and `page_size` parameters.
- Added search functionality to filter contacts based on a search term.
- Implemented sorting options for the contacts list, enabling users to sort by various fields.
- Updated the frontend to reflect these changes, including a new pagination UI and improved loading states.
- Introduced caching for multibyte hop chunks to optimize performance when retrieving contact badge evidence.
- Added tests to ensure the new features work as expected and maintain existing functionality.
2026-07-28 12:36:56 -07:00

27 lines
713 B
Python

"""Run dependency-free browser-side regression tests for the contacts manager."""
from __future__ import annotations
import shutil
import subprocess
from pathlib import Path
import pytest
def test_contacts_manager_frontend_behaviors() -> None:
node = shutil.which("node")
if not node:
pytest.skip("Node.js is required for contacts frontend behavior tests")
project_root = Path(__file__).resolve().parents[1]
result = subprocess.run(
[node, "--test", "tests/js/contacts_manager.test.mjs"],
cwd=project_root,
capture_output=True,
text=True,
timeout=30,
check=False,
)
assert result.returncode == 0, result.stdout + result.stderr