import { test, expect } from '@playwright/test'; test.describe('Authentication', () => { test('Successful Login with Valid Passphrase', async ({ page }) => { // 1. Navigate to the application URL await page.goto('https://unisono.aglink.duckdns.org'); // 2. On the login page, enter the valid AUTH_PASSPHRASE into the "Passphrase" textbox. await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere'); // 3. Click the "Enter" button. await page.getByRole('button', { name: 'Enter' }).click(); // Expected Results: // - The user is redirected to a new session creation page (e.g., /session/). await expect(page).toHaveURL(/.*\/session\/.*/); // - The "Harmonize Desires" heading is visible. await expect(page.getByRole('heading', { name: 'Harmonize Desires' })).toBeVisible(); // - The session creation form (Topic, Details, Number of Expected Responses, Start Session button) is displayed. await expect(page.getByRole('textbox', { name: 'Topic' })).toBeVisible(); await expect(page.getByRole('textbox', { name: 'Details (Optional)' })).toBeVisible(); await expect(page.getByRole('spinbutton', { name: 'Number of Expected Responses' })).toBeVisible(); await expect(page.getByRole('button', { name: 'Start Session' })).toBeVisible(); }); });