Tests: 4. Submit Desires Functionality. Multiple User approcah needs to be fixed.
This commit is contained in:
32
tests/e2e/single-user-submit-only-what-you-want.e2e.test.ts
Normal file
32
tests/e2e/single-user-submit-only-what-you-want.e2e.test.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user