Tests: 4. Submit Desires Functionality. Multiple User approcah needs to be fixed.

This commit is contained in:
aodulov
2025-10-29 17:31:16 +02:00
parent 482d36fc8a
commit 13e150d7d7
7 changed files with 440 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { test, expect } from '@playwright/test';
test.describe('Submit Desires Functionality', () => {
test('Single User - Submit Only "What You Want"', async ({ page }) => {
// Ensure a session is created and the user is on the active session page.
await page.goto('https://unisono.aglink.duckdns.org/login');
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
await page.getByRole('button', { name: 'Enter' }).click();
await page.waitForURL(/.*\/session\/.*/);
await page.getByRole('textbox', { name: 'Topic' }).fill('Single User Only Want');
await page.getByRole('textbox', { name: 'Details (Optional)' }).fill('Testing submission of only \'What You Want\' by a single user.');
await page.getByRole('spinbutton', { name: 'Number of Expected Responses' }).fill('2');
await page.getByRole('button', { name: 'Start Session' }).click();
await page.waitForURL(/.*\/session\/.*/);
// 2. Enter items into "What You Want" textbox (e.g., "Only Want This").
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('Only Want This');
// 3. Leave other desire fields empty.
// (Implicitly handled by not filling them)
// 4. Click the "Submit Desires" button.
await page.getByRole('button', { name: 'Submit Desires' }).click();
// Expected Results:
// - Desires are submitted successfully.
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
// - The page transitions to a "Waiting for other participants" or similar state.
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
});
});