generated from john/python-template
Added Home page
This commit is contained in:
@@ -13,15 +13,34 @@ class TestPageRendering:
|
||||
response = client.get("/", follow_redirects=False)
|
||||
|
||||
assert response.status_code == 307
|
||||
assert response.headers["location"] == "/ui"
|
||||
assert response.headers["location"] == "/ui/homepage"
|
||||
|
||||
def test_ui_redirects_to_documents(self, app_client):
|
||||
"""GET /ui redirects to the documents page."""
|
||||
def test_ui_redirects_to_homepage(self, app_client):
|
||||
"""GET /ui redirects to the homepage."""
|
||||
_, client = app_client
|
||||
response = client.get("/ui", follow_redirects=False)
|
||||
|
||||
assert response.status_code == 307
|
||||
assert response.headers["location"] == "/ui/documents"
|
||||
assert response.headers["location"] == "/ui/homepage"
|
||||
|
||||
def test_homepage_page_renders(self, app_client):
|
||||
"""GET /ui/homepage renders the homepage page."""
|
||||
_, client = app_client
|
||||
response = client.get("/ui/homepage")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Home" in response.text
|
||||
assert "Edit Home Page" in response.text
|
||||
assert '/ui/homepage' in response.text
|
||||
|
||||
def test_homepage_edit_page_renders(self, app_client):
|
||||
"""GET /ui/homepage/edit renders the edit page."""
|
||||
_, client = app_client
|
||||
response = client.get("/ui/homepage/edit")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Edit Home Page" in response.text
|
||||
assert "Homepage markdown" in response.text
|
||||
|
||||
def test_upload_page_renders_expected_controls(self, app_client):
|
||||
"""GET /ui/upload redirects to the job-create flow."""
|
||||
|
||||
Reference in New Issue
Block a user