test(e2e): cover the minimal MVP path end to end on the real backend

This commit is contained in:
shira committed 2026-10-10 16:12:55 +03:00
1 parent 89932b8714
commit 9909120286
11 files changed
+1084 -5

No files matched your search

@@ -18,6 +18,10 @@ services:
# The browser suite delivers the synthetic inbox event through the real
# pipeline; the production default is off.
NOTIFICATION_SYNTHETIC_ENABLED: "true"
# The fixture bank is synthetic, so a passed full test may receive the
# uncalibrated demonstration category after the runner attests the
# opening. Ordinary and release E2E keep the default false.
ASSESSMENT_DEMO_CATEGORIES_ENABLED: "true"
depends_on:
mail-fixture:
condition: service_healthy
@@ -31,6 +35,7 @@ services:
E2E_MAIL_FIXTURE: "1"
E2E_COMPANY_FIXTURE: "1"
E2E_QUESTIONNAIRE_FIXTURE: "1"
E2E_DEMO_CATEGORIES: "1"
E2E_CONSENT_FIXTURE: "1"
E2E_COMPANY_FIXTURE_URL: http://company-fixture:8081/company/memberships/revoke
E2E_COMPANY_FIXTURE_TOKEN: ${E2E_COMPANY_FIXTURE_TOKEN:?Set the per-run company fixture token}
+6
View File
@@ -266,6 +266,12 @@ try {
compose exec -T backend /consent-fixture
# Publish an explicitly reviewed synthetic bank for the questionnaire flow.
compose exec -T -e E2E_QUESTIONNAIRE_FIXTURE=1 backend /questionnaire-fixture
# Attest that opening as a synthetic demonstration source, so a passed full
# test of this stand receives the uncalibrated category. The backend of
# this overlay alone enables the runtime gate.
compose exec -T backend /assessment-category-attest attest \
--specialization backend --grade junior --task-language go \
--actor operator:e2e-category-attestor
fi
playwright_command=(node node_modules/@playwright/test/cli.js test)
+4
View File
@@ -117,6 +117,8 @@ class ComposeMailFixtureTest(unittest.TestCase):
self.assertNotIn(name, rendered["services"]["playwright"].get("environment", {}))
self.assertNotIn("E2E_QUESTIONNAIRE_FIXTURE", backend["environment"])
self.assertNotIn("E2E_QUESTIONNAIRE_FIXTURE", rendered["services"]["playwright"].get("environment", {}))
self.assertEqual(backend["environment"]["ASSESSMENT_DEMO_CATEGORIES_ENABLED"], "false")
self.assertNotIn("E2E_DEMO_CATEGORIES", rendered["services"]["playwright"].get("environment", {}))
def test_fixture_uses_an_e2e_build_and_fixed_synthetic_credentials(self):
services = self.fixture["services"]
@@ -138,6 +140,8 @@ class ComposeMailFixtureTest(unittest.TestCase):
self.assertEqual(services["playwright"]["environment"]["E2E_QUESTIONNAIRE_FIXTURE"], "1")
self.assertNotIn("E2E_QUESTIONNAIRE_FIXTURE", backend["environment"])
self.assertNotIn("questionnaire-fixture", (ROOT / "backend" / "Dockerfile").read_text())
self.assertEqual(backend["environment"]["ASSESSMENT_DEMO_CATEGORIES_ENABLED"], "true")
self.assertEqual(services["playwright"]["environment"]["E2E_DEMO_CATEGORIES"], "1")
self.assertNotIn("E2E_MAIL_FIXTURE", services["frontend"].get("environment", {}))
def test_fixture_has_no_host_port_storage_network_or_outbound_route(self):