fix dashboard auth flow
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Cleanup Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 2m21s
CI/CD Pipeline / Build and Push Images (push) Successful in 2m24s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Cleanup Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 2m21s
CI/CD Pipeline / Build and Push Images (push) Successful in 2m24s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
This commit is contained in:
23
tests/apps/parsers/test_dashboard_page.py
Normal file
23
tests/apps/parsers/test_dashboard_page.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Regression tests for the standalone parser dashboard page."""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class ParserDashboardPageTest(TestCase):
|
||||
def test_dashboard_exposes_login_and_registration_flows(self):
|
||||
response = self.client.get("/dashboard")
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
content = response.content.decode()
|
||||
self.assertIn('id="loginForm"', content)
|
||||
self.assertIn('id="registerForm"', content)
|
||||
self.assertIn("/api/v1/users/login/", content)
|
||||
self.assertIn("/api/v1/users/register/", content)
|
||||
|
||||
def test_dashboard_does_not_drop_jwt_on_registers_panel_failure(self):
|
||||
response = self.client.get("/dashboard")
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
content = response.content.decode()
|
||||
self.assertIn("refreshRegisters().catch(renderRegistersUnavailable)", content)
|
||||
self.assertIn("isAuthError(error)", content)
|
||||
Reference in New Issue
Block a user