diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9450b251..a320d54a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,8 @@ jobs: - name: Run Happy Path Production Test working-directory: frontend env: - MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} + TESTMAIL_API_KEY: ${{ secrets.TESTMAIL_API_KEY }} + TESTMAIL_NAMESPACE: ${{ secrets.TESTMAIL_NAMESPACE }} E2E_TEST_TOKEN: ${{ secrets.E2E_TEST_TOKEN }} E2E_ADMIN_TOKEN: ${{ secrets.E2E_ADMIN_TOKEN }} run: | diff --git a/.github/workflows/e2e-happy-path.yml b/.github/workflows/e2e-happy-path.yml index 0b63ff31..f263da2b 100644 --- a/.github/workflows/e2e-happy-path.yml +++ b/.github/workflows/e2e-happy-path.yml @@ -70,8 +70,9 @@ jobs: - name: Run E2E Happy Path Test working-directory: frontend env: - MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} - E2E_TEST_TOKEN: ${{ inputs.use_test_token == 'true' && secrets.E2E_TEST_TOKEN || '' }} + TESTMAIL_API_KEY: ${{ secrets.TESTMAIL_API_KEY }} + TESTMAIL_NAMESPACE: ${{ secrets.TESTMAIL_NAMESPACE }} + E2E_TEST_TOKEN: ${{ inputs.use_test_token && secrets.E2E_TEST_TOKEN || '' }} E2E_ADMIN_TOKEN: ${{ secrets.E2E_ADMIN_TOKEN }} DEBUG_MODE: ${{ inputs.debug_mode || 'false' }} run: | diff --git a/docs/E2E-HAPPY-PATH-TEST-SPEC.md b/docs/E2E-HAPPY-PATH-TEST-SPEC.md index aadf6136..4facaae8 100644 --- a/docs/E2E-HAPPY-PATH-TEST-SPEC.md +++ b/docs/E2E-HAPPY-PATH-TEST-SPEC.md @@ -14,14 +14,14 @@ ## Test Requirements -### 1. New User Registration (MailSlurp) +### 1. New User Registration (testmail.app) - [ ] Navigate to landing page (`gen.nomadkaraoke.com`) - [ ] Click "Sign In" or "Get Started" button -- [ ] Create a NEW MailSlurp inbox (fresh email address for each test run) +- [ ] Create a NEW testmail.app inbox (fresh email address for each test run) - [ ] Enter the test email in the beta enrollment form - [ ] Submit the form -- [ ] Wait for welcome/magic-link email in MailSlurp inbox +- [ ] Wait for welcome/magic-link email in testmail.app inbox - [ ] Extract the magic link from the email - [ ] Click/navigate to the magic link to authenticate - [ ] Verify user is logged in and has credits @@ -118,7 +118,8 @@ ### Environment Variables ```bash -MAILSLURP_API_KEY=xxx # Required - for email testing +TESTMAIL_API_KEY=xxx # Required - for email testing +TESTMAIL_NAMESPACE=xxx # Required - testmail.app namespace # No pre-auth tokens - test handles full signup ``` @@ -160,7 +161,8 @@ Log detailed progress at each step with timestamps for debugging. ### Secrets Required -- `MAILSLURP_API_KEY` - For email testing +- `TESTMAIL_API_KEY` - For email testing +- `TESTMAIL_NAMESPACE` - testmail.app namespace ### Workflow Steps diff --git a/frontend/components/job/JobSubmission.tsx b/frontend/components/job/JobSubmission.tsx index 655ddf14..e96f4dc0 100644 --- a/frontend/components/job/JobSubmission.tsx +++ b/frontend/components/job/JobSubmission.tsx @@ -272,8 +272,8 @@ export function JobSubmission({ onJobCreated }: JobSubmissionProps) { Skip lyrics review (non-interactive)

- Warning: AI lyrics correction isn't perfect. - Skipping review will likely result in timing errors and incorrect words in your karaoke video. + Warning: auto lyrics correction isn't perfect. + Skipping review will likely result in incorrect words in your karaoke video.

@@ -377,8 +377,8 @@ export function JobSubmission({ onJobCreated }: JobSubmissionProps) { Skip lyrics review (non-interactive)

- Warning: AI lyrics correction isn't perfect. - Skipping review will likely result in timing errors and incorrect words in your karaoke video. + Warning: auto lyrics correction isn't perfect. + Skipping review will likely result in incorrect words in your karaoke video.

@@ -465,8 +465,8 @@ export function JobSubmission({ onJobCreated }: JobSubmissionProps) { Skip lyrics review (non-interactive)

- Warning: AI lyrics correction isn't perfect. - Skipping review will likely result in timing errors and incorrect words in your karaoke video. + Warning: auto lyrics correction isn't perfect. + Skipping review will likely result in incorrect words in your karaoke video.

diff --git a/frontend/e2e/production/happy-path-real-user.spec.ts b/frontend/e2e/production/happy-path-real-user.spec.ts index f067b450..ca37e1db 100644 --- a/frontend/e2e/production/happy-path-real-user.spec.ts +++ b/frontend/e2e/production/happy-path-real-user.spec.ts @@ -11,7 +11,7 @@ import { createEmailHelper, isEmailTestingAvailable } from '../helpers/email-tes * * Test Flow: * 1. Landing Page - Navigate and verify - * 2. New User Signup - Create MailSlurp inbox, submit beta form, verify email + * 2. New User Signup - Create testmail.app inbox, submit beta form, verify email * 3. Magic Link Auth - Click magic link to authenticate * 4. Create Job - Search for test song via UI * 5. Audio Selection - Select audio source via UI dialog @@ -24,7 +24,7 @@ import { createEmailHelper, isEmailTestingAvailable } from '../helpers/email-tes * 12. Cleanup - Delete distributed content and job * * Environment Variables: - * - MAILSLURP_API_KEY: Required for email testing (can be skipped with E2E_TEST_TOKEN) + * - TESTMAIL_API_KEY + TESTMAIL_NAMESPACE: Required for email testing (can be skipped with E2E_TEST_TOKEN) * - E2E_TEST_TOKEN: Pre-configured user token to skip signup flow (for iterations) * - E2E_ADMIN_TOKEN: Required for cleanup endpoint (optional - cleanup skipped if not set) */ @@ -138,12 +138,12 @@ test.describe('E2E Happy Path - Real User with Full UI Interactions', () => { }) => { test.setTimeout(TIMEOUTS.fullTest); - // Check if we have a pre-configured token (for iterations without using MailSlurp) + // Check if we have a pre-configured token (for iterations without using testmail.app) const usePreConfiguredToken = hasPreConfiguredToken(); - // Skip if neither pre-configured token nor MailSlurp is available + // Skip if neither pre-configured token nor testmail.app is available if (!usePreConfiguredToken && !isEmailTestingAvailable()) { - test.skip(true, 'Neither E2E_TEST_TOKEN nor MAILSLURP_API_KEY set - cannot run test'); + test.skip(true, 'Neither E2E_TEST_TOKEN nor TESTMAIL_API_KEY/TESTMAIL_NAMESPACE set - cannot run test'); return; } @@ -217,7 +217,7 @@ test.describe('E2E Happy Path - Real User with Full UI Interactions', () => { console.log('STEP 3 COMPLETE: User authenticated with pre-configured token'); } else { - // ----- FULL PATH: Beta signup with MailSlurp ----- + // ----- FULL PATH: Beta signup with testmail.app ----- console.log('\n========================================'); console.log('STEP 2: New User Beta Enrollment'); console.log('========================================'); diff --git a/infrastructure/__main__.py b/infrastructure/__main__.py index dfd636c8..d2e205e5 100644 --- a/infrastructure/__main__.py +++ b/infrastructure/__main__.py @@ -1268,12 +1268,12 @@ def upload_to_gcs(local_path: Path, gcs_uri: str): # Upload a file or folder to GCS parts = gcs_uri.replace("gs://", "").split("/", 1) bucket_name = parts[0] - prefix = parts[1] if len(parts) > 1 else "" + prefix = parts[1].rstrip("/") if len(parts) > 1 else "" bucket = storage_client.bucket(bucket_name) if local_path.is_file(): - blob_name = f"{prefix}/{local_path.name}".strip("/") + blob_name = f"{prefix}/{local_path.name}" if prefix else local_path.name blob = bucket.blob(blob_name) blob.upload_from_filename(str(local_path)) logger.info(f"Uploaded: {local_path} -> gs://{bucket_name}/{blob_name}") @@ -1281,7 +1281,7 @@ def upload_to_gcs(local_path: Path, gcs_uri: str): for file in local_path.rglob("*"): if file.is_file(): rel_path = file.relative_to(local_path) - blob_name = f"{prefix}/{rel_path}".strip("/") + blob_name = f"{prefix}/{rel_path}" if prefix else str(rel_path) blob = bucket.blob(blob_name) blob.upload_from_filename(str(file)) logger.info(f"Uploaded: {file} -> gs://{bucket_name}/{blob_name}") @@ -1439,7 +1439,7 @@ async def process_job(job_id: str, request: EncodeRequest): # Convert local paths to blob paths (backend expects blob paths, not full gs:// URIs) # output_gcs_path is like "gs://bucket/jobs/id/encoded/" - # We need paths like "jobs/id/encoded/output_4k.mp4" + # We need paths like "jobs/id/encoded/output_4k_lossless.mp4" gcs_path = request.output_gcs_path.replace("gs://", "") parts = gcs_path.split("/", 1) prefix = parts[1].rstrip("/") if len(parts) > 1 else ""