| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def test_space_test_endpoint_panel_has_no_set_api_name_banner(): | |
| app = (ROOT / "web" / "static" / "app.js").read_text(encoding="utf-8") | |
| render = app.split("function renderValidationEndpoints", 1)[1].split("function setGeneratedSpaceLinksEnabled", 1)[0] | |
| assert "endpoint-selected-row" not in render | |
| assert "Set API name" not in render | |
| assert "API name used for validation" not in render | |
| assert "Click an endpoint" not in render | |
| assert "endpoint-info-card" in render | |
| assert "Inputs" in render | |
| assert "Outputs" in render | |
| def test_endpoint_chip_click_still_updates_validation_api_field(): | |
| app = (ROOT / "web" / "static" / "app.js").read_text(encoding="utf-8") | |
| assert "function applyValidationEndpoint" in app | |
| assert "setInputValue('validateApi',name)" in app | |
| assert "data-endpoint-name" in app | |
| assert "Use ${escapeHtml(name)} for validation" in app | |