You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
828 B
24 lines
828 B
import pytest
|
|
|
|
|
|
@pytest.mark.anyio
|
|
async def test_web_app_shell_is_served(raw_api_client) -> None:
|
|
response = await raw_api_client.get("/app")
|
|
|
|
assert response.status_code == 200
|
|
assert "text/html" in response.headers["content-type"]
|
|
assert "<title>Iron</title>" in response.text
|
|
|
|
|
|
@pytest.mark.anyio
|
|
async def test_web_assets_are_served(raw_api_client) -> None:
|
|
script_response = await raw_api_client.get("/assets/app.js")
|
|
style_response = await raw_api_client.get("/assets/app.css")
|
|
|
|
assert script_response.status_code == 200
|
|
assert "javascript" in script_response.headers["content-type"]
|
|
assert "createRoot" in script_response.text
|
|
|
|
assert style_response.status_code == 200
|
|
assert "text/css" in style_response.headers["content-type"]
|
|
assert ".app-shell" in style_response.text
|
|
|