Compare commits

...
Author SHA1 Message Date
Andrew BeveridgeandClaude Opus 4.5 275fc909f6 fix: E2E test issues - add Firestore index and fix job endpoint URL
- Add missing Firestore composite index for customer_email + made_for_you queries
  (required for test-webhook made-for-you order processing)
- Fix getJobDetails helper to use /api/jobs/{job_id} instead of /api/admin/jobs/{job_id}
  (the admin route doesn't have a GET method)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 21:52:34 -08:00
2 changed files with 16 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -200,7 +200,7 @@ export async function getJobDetails(
adminToken: string,
apiUrl: string = URLS.production.api
): Promise<Record<string, unknown> | null> {
const response = await fetch(`${apiUrl}/api/admin/jobs/${jobId}`, {
const response = await fetch(`${apiUrl}/api/jobs/${jobId}`, {
headers: {
'Authorization': `Bearer ${adminToken}`,
},
+15
View File
@@ -61,6 +61,21 @@ def create_database() -> dict:
opts=pulumi.ResourceOptions(depends_on=[firestore_db]),
)
# Jobs: query by customer_email + made_for_you, order by created_at
# Used for finding existing made-for-you orders for a customer
resources["firestore_index_jobs_customer_mfy"] = firestore.Index(
"firestore-index-jobs-customer-mfy",
project=PROJECT_ID,
database=firestore_db.name,
collection="jobs",
fields=[
firestore.IndexFieldArgs(field_path="customer_email", order="ASCENDING"),
firestore.IndexFieldArgs(field_path="made_for_you", order="ASCENDING"),
firestore.IndexFieldArgs(field_path="created_at", order="DESCENDING"),
],
opts=pulumi.ResourceOptions(depends_on=[firestore_db]),
)
# Sessions: query by user_email + is_active, order by created_at
resources["firestore_index_sessions_active"] = firestore.Index(
"firestore-index-sessions-active",