mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-01 08:19:30 +00:00
- 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.
27 lines
713 B
Python
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
|