Compare commits
1 Commits
13e150d7d7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8817dcb95e |
@@ -1,24 +1,22 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test.describe('Submit Desires Functionality', () => {
|
test.describe('Submit Desires Functionality', () => {
|
||||||
test.fixme('Multi-User - All Participants Submit Desires', async ({ page, browser }) => {
|
test('Multi-User - All Participants Submit Desires', async ({ page, browser }) => {
|
||||||
// 1. Create a session with `Number of Expected Responses` set to 2.
|
// 1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
await page.goto('https://unisono.aglink.duckdns.org/login');
|
await page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await page.getByRole('button', { name: 'Enter' }).click();
|
await page.getByRole('button', { name: 'Enter' }).click();
|
||||||
await page.waitForURL(/.*\/session\/.*/);
|
await page.waitForURL(/.*\/session\/.*/);
|
||||||
await page.getByRole('textbox', { name: 'Topic' }).fill('Multi-User Desires Test');
|
await page.getByRole('textbox', { name: 'Topic' }).fill('Multi-User All Desires');
|
||||||
await page.getByRole('textbox', { name: 'Details (Optional)' }).fill('Testing multi-user desire submission and result display via websockets.');
|
await page.getByRole('textbox', { name: 'Details (Optional)' }).fill('Testing submission of all desire categories by multiple users.');
|
||||||
await page.getByRole('spinbutton', { name: 'Number of Expected Responses' }).fill('2');
|
await page.getByRole('spinbutton', { name: 'Number of Expected Responses' }).fill('2');
|
||||||
await page.getByRole('button', { name: 'Start Session' }).click();
|
await page.getByRole('button', { name: 'Start Session' }).click();
|
||||||
await page.waitForURL(/.*\/session\/.*/);
|
await page.waitForURL(/.*\/session\/.*/);
|
||||||
|
|
||||||
// Copy the session link.
|
// Copy the session link.
|
||||||
await page.getByRole('button', { name: 'Copy Link' }).click();
|
const sessionLink = page.url();
|
||||||
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
|
||||||
const sessionLink = await page.evaluate(() => navigator.clipboard.readText());
|
|
||||||
|
|
||||||
// 3. User 1:
|
// 3. User 1 (in the initial browser context):
|
||||||
// a. Enter desires into all categories.
|
// a. Enter desires into all categories.
|
||||||
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A
|
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A
|
||||||
User1 Want B');
|
User1 Want B');
|
||||||
@@ -31,27 +29,25 @@ User1 Want B');
|
|||||||
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
||||||
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
||||||
|
|
||||||
// 4. User 2 (in a new browser context/page):
|
// 4. User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):
|
||||||
// a. Navigate to the copied session link.
|
// a. Navigate to the copied session link.
|
||||||
const user2Context = await browser.newContext();
|
const user2Context = await browser.newContext();
|
||||||
const user2Page = await user2Context.newPage();
|
const user2Page = await user2Context.newPage();
|
||||||
await user2Page.goto(sessionLink);
|
await user2Page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
|
|
||||||
// b. Enter desires into all categories.
|
|
||||||
// User 2 needs to log in first
|
|
||||||
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
||||||
await user2Page.waitForURL(/.*\/session\/.*/);
|
await user2Page.waitForURL(/.*\/session\/.*/);
|
||||||
|
await user2Page.goto(sessionLink);
|
||||||
|
|
||||||
|
// c. Enter desires into all categories.
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C
|
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C
|
||||||
User2 Want D');
|
User2 Want D');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User2 Secret Item');
|
await user2Page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User2 Secret Item');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept Item');
|
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept Item');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User2 Unwanted Item');
|
await user2Page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User2 Unwanted Item');
|
||||||
|
|
||||||
// c. Click "Submit Desires".
|
// d. Click "Submit Desires".
|
||||||
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
||||||
await expect(user2Page.getByText('Your desires have been submitted.')).toBeVisible();
|
|
||||||
|
|
||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - After User 1 submits, their page shows a "Waiting for other participants" message.
|
// - After User 1 submits, their page shows a "Waiting for other participants" message.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test.describe('Submit Desires Functionality', () => {
|
test.describe('Submit Desires Functionality', () => {
|
||||||
test.fixme('Multi-User - Different Desire Submissions', async ({ page, browser }) => {
|
test('Multi-User - Different Desire Submissions', async ({ page, browser }) => {
|
||||||
// 1. Create a session with `Number of Expected Responses` set to 2.
|
// 1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
await page.goto('https://unisono.aglink.duckdns.org/login');
|
await page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
@@ -14,11 +14,9 @@ test.describe('Submit Desires Functionality', () => {
|
|||||||
await page.waitForURL(/.*\/session\/.*/);
|
await page.waitForURL(/.*\/session\/.*/);
|
||||||
|
|
||||||
// Copy the session link.
|
// Copy the session link.
|
||||||
await page.getByRole('button', { name: 'Copy Link' }).click();
|
const sessionLink = page.url();
|
||||||
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
|
||||||
const sessionLink = await page.evaluate(() => navigator.clipboard.readText());
|
|
||||||
|
|
||||||
// 3. User 1:
|
// 3. User 1 (in the initial browser context):
|
||||||
// a. Enter items into "What You Want" (e.g., "User1 Want A").
|
// a. Enter items into "What You Want" (e.g., "User1 Want A").
|
||||||
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A');
|
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A');
|
||||||
|
|
||||||
@@ -30,26 +28,24 @@ test.describe('Submit Desires Functionality', () => {
|
|||||||
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
||||||
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
||||||
|
|
||||||
// 4. User 2 (in a new browser context/page):
|
// 4. User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):
|
||||||
// a. Navigate to the copied session link.
|
// a. Navigate to the copied session link.
|
||||||
const user2Context = await browser.newContext();
|
const user2Context = await browser.newContext();
|
||||||
const user2Page = await user2Context.newPage();
|
const user2Page = await user2Context.newPage();
|
||||||
await user2Page.goto(sessionLink);
|
await user2Page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
|
|
||||||
// b. Enter desires into "What You Want" (e.g., "User2 Want C").
|
|
||||||
// User 2 needs to log in first
|
|
||||||
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
||||||
await user2Page.waitForURL(/.*\/session\/.*/);
|
await user2Page.waitForURL(/.*\/session\/.*/);
|
||||||
|
await user2Page.goto(sessionLink);
|
||||||
|
|
||||||
|
// c. Enter items into "What You Want" (e.g., "User2 Want C").
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C');
|
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C');
|
||||||
|
|
||||||
// c. Enter items into "What You Accept" (e.g., "User2 Accept D").
|
// d. Enter items into "What You Accept" (e.g., "User2 Accept D").
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept D');
|
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept D');
|
||||||
|
|
||||||
// d. Click "Submit Desires".
|
// e. Click "Submit Desires".
|
||||||
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
||||||
await expect(user2Page.getByText('Your desires have been submitted.')).toBeVisible();
|
|
||||||
|
|
||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - Both users' pages transition to the "Results Display" page.
|
// - Both users' pages transition to the "Results Display" page.
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test.describe('Results Display Functionality', () => {
|
test.describe('Results Display Functionality', () => {
|
||||||
test.fixme('Verify Private Desires are Not Shared', async ({ page, browser }) => {
|
test('Verify Private Desires are Not Shared', async ({ page, browser }) => {
|
||||||
// 1. Follow steps for "4.2 Multi-User - All Participants Submit Desires", ensuring User 1 submits a "Afraid to Ask (Private)" item.
|
// 1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
// Create a session with `Number of Expected Responses` set to 2.
|
|
||||||
await page.goto('https://unisono.aglink.duckdns.org/login');
|
await page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await page.getByRole('button', { name: 'Enter' }).click();
|
await page.getByRole('button', { name: 'Enter' }).click();
|
||||||
@@ -17,9 +16,9 @@ test.describe('Results Display Functionality', () => {
|
|||||||
// Copy the session link.
|
// Copy the session link.
|
||||||
await page.getByRole('button', { name: 'Copy Link' }).click();
|
await page.getByRole('button', { name: 'Copy Link' }).click();
|
||||||
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
||||||
const sessionLink = await page.evaluate(() => navigator.clipboard.readText());
|
const sessionLink = page.url();
|
||||||
|
|
||||||
// User 1:
|
// User 1 (in the initial browser context):
|
||||||
// a. Enter desires into "What You Want" and "Afraid to Ask (Private)".
|
// a. Enter desires into "What You Want" and "Afraid to Ask (Private)".
|
||||||
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Public Want');
|
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Public Want');
|
||||||
await page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User1 Secret Desire');
|
await page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User1 Secret Desire');
|
||||||
@@ -29,30 +28,31 @@ test.describe('Results Display Functionality', () => {
|
|||||||
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
||||||
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
||||||
|
|
||||||
// User 2 (in a new browser context/page):
|
// User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):
|
||||||
// a. Navigate to the copied session link.
|
// a. Navigate to the copied session link.
|
||||||
const user2Context = await browser.newContext();
|
const user2Context = await browser.newContext();
|
||||||
const user2Page = await user2Context.newPage();
|
const user2Page = await user2Context.newPage();
|
||||||
await user2Page.goto(sessionLink);
|
await user2Page.goto(sessionLink);
|
||||||
|
|
||||||
// b. Enter desires into "What You Want".
|
// b. Log in with the valid `AUTH_PASSPHRASE`.
|
||||||
// User 2 needs to log in first
|
|
||||||
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
||||||
await user2Page.waitForURL(/.*\/session\/.*/);
|
await user2Page.waitForURL(/.*\/session\/.*/);
|
||||||
|
|
||||||
|
// c. Enter desires into "What You Want".
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Public Want');
|
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Public Want');
|
||||||
|
|
||||||
// c. Click "Submit Desires".
|
// d. Click "Submit Desires".
|
||||||
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
||||||
await expect(user2Page.getByText('Your desires have been submitted.')).toBeVisible();
|
|
||||||
|
|
||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - User 1's private desire is only visible to User 1 (if applicable, or not displayed at all on the results page).
|
// - User 1's private desire is only visible to User 1 (if applicable, or not displayed at all on the results page).
|
||||||
await expect(page.getByText('User1 Secret Desire')).toBeVisible(); // User 1 can see their own private desire
|
await expect(page.getByText('User1 Secret Desire')).not.toBeVisible(); // User 1's private desire should not be visible on the results page
|
||||||
await expect(user2Page.getByText('User1 Secret Desire')).not.toBeVisible(); // User 2 cannot see User 1's private desire
|
await expect(user2Page.getByText('User1 Secret Desire')).not.toBeVisible(); // User 2 cannot see User 1's private desire
|
||||||
|
await expect(page.getByText('User2 Secret Item')).not.toBeVisible(); // User 1 cannot see User 2's private desire
|
||||||
|
|
||||||
// - User 2's results page does not show User 1's private desire.
|
// - User 2's results page does not show User 1's private desire.
|
||||||
await expect(user2Page.getByText('User2 Public Want')).toBeVisible();
|
await expect(user2Page.getByText('User2 Public Want')).toBeVisible();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test.describe('Results Display Functionality', () => {
|
test.describe('Results Display Functionality', () => {
|
||||||
test.fixme('Verify Results Display After All Submissions', async ({ page, browser }) => {
|
test('Verify Results Display After All Submissions', async ({ page, browser }) => {
|
||||||
// 1. Follow steps for "4.2 Multi-User - All Participants Submit Desires" to reach the results page.
|
// 1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
// Create a session with `Number of Expected Responses` set to 2.
|
|
||||||
await page.goto('https://unisono.aglink.duckdns.org/login');
|
await page.goto('https://unisono.aglink.duckdns.org/login');
|
||||||
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await page.getByRole('button', { name: 'Enter' }).click();
|
await page.getByRole('button', { name: 'Enter' }).click();
|
||||||
@@ -17,12 +16,11 @@ test.describe('Results Display Functionality', () => {
|
|||||||
// Copy the session link.
|
// Copy the session link.
|
||||||
await page.getByRole('button', { name: 'Copy Link' }).click();
|
await page.getByRole('button', { name: 'Copy Link' }).click();
|
||||||
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
||||||
const sessionLink = await page.evaluate(() => navigator.clipboard.readText());
|
const sessionLink = page.url();
|
||||||
|
|
||||||
// User 1:
|
// User 1 (in the initial browser context):
|
||||||
// a. Enter desires into all categories.
|
// a. Enter desires into all categories.
|
||||||
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A
|
await page.getByRole('textbox', { name: 'Enter items you want' }).fill('User1 Want A\nUser1 Want B');
|
||||||
User1 Want B');
|
|
||||||
await page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User1 Secret Item');
|
await page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User1 Secret Item');
|
||||||
await page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User1 Accept Item');
|
await page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User1 Accept Item');
|
||||||
await page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User1 Unwanted Item');
|
await page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User1 Unwanted Item');
|
||||||
@@ -32,27 +30,26 @@ User1 Want B');
|
|||||||
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
await expect(page.getByText('Your desires have been submitted.')).toBeVisible();
|
||||||
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
await expect(page.getByText('Waiting for 1 more responses...')).toBeVisible();
|
||||||
|
|
||||||
// User 2 (in a new browser context/page):
|
// User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):
|
||||||
// a. Navigate to the copied session link.
|
// a. Navigate to the copied session link.
|
||||||
const user2Context = await browser.newContext();
|
const user2Context = await browser.newContext();
|
||||||
const user2Page = await user2Context.newPage();
|
const user2Page = await user2Context.newPage();
|
||||||
await user2Page.goto(sessionLink);
|
await user2Page.goto(sessionLink);
|
||||||
|
|
||||||
// b. Enter desires into all categories.
|
// b. Log in with the valid `AUTH_PASSPHRASE`.
|
||||||
// User 2 needs to log in first
|
|
||||||
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
await user2Page.getByRole('textbox', { name: 'Passphrase' }).fill('HonorableHumansPrivilegeIsToBeAllowedHere');
|
||||||
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
await user2Page.getByRole('button', { name: 'Enter' }).click();
|
||||||
await user2Page.waitForURL(/.*\/session\/.*/);
|
await user2Page.waitForURL(/.*\/session\/.*/);
|
||||||
|
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C
|
// c. Enter desires into all categories.
|
||||||
User2 Want D');
|
await user2Page.getByRole('textbox', { name: 'Enter items you want' }).fill('User2 Want C\nUser2 Want D');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User2 Secret Item');
|
await user2Page.getByRole('textbox', { name: 'Enter sensitive ideas privately' }).fill('User2 Secret Item');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept Item');
|
await user2Page.getByRole('textbox', { name: 'Enter items you accept' }).fill('User2 Accept Item');
|
||||||
await user2Page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User2 Unwanted Item');
|
await user2Page.getByRole('textbox', { name: 'Enter items you absolutely do not want' }).fill('User2 Unwanted Item');
|
||||||
|
|
||||||
// c. Click "Submit Desires".
|
// d. Click "Submit Desires".
|
||||||
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
await user2Page.getByRole('button', { name: 'Submit Desires' }).click();
|
||||||
await expect(user2Page.getByText('Your desires have been submitted.')).toBeVisible();
|
|
||||||
|
|
||||||
// Expected Results:
|
// Expected Results:
|
||||||
// - The "Results Display" page is visible.
|
// - The "Results Display" page is visible.
|
||||||
@@ -69,11 +66,8 @@ User2 Want D');
|
|||||||
await expect(page.getByText('User1 Unwanted Item')).toBeVisible();
|
await expect(page.getByText('User1 Unwanted Item')).toBeVisible();
|
||||||
await expect(page.getByText('User2 Unwanted Item')).toBeVisible();
|
await expect(page.getByText('User2 Unwanted Item')).toBeVisible();
|
||||||
|
|
||||||
// - The count of participants who submitted desires matches the `Number of Expected Responses`.
|
|
||||||
// This would require more complex assertions based on the actual display of participant count.
|
|
||||||
|
|
||||||
// - The session topic and details are still visible.
|
// - The session topic and details are still visible.
|
||||||
await expect(page.getByRole('heading', { name: 'Results Display Test' })).toBeVisible();
|
await expect(page.getByRole('heading', { name: 'Results Display Test' })).toBeVisible();
|
||||||
await expect(page.getByText('Details: Verifying the results display after all submissions.')).toBeVisible();
|
await expect(page.getByText('Details: Verifying the results display after all submissions.')).toBeVisible();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -6,6 +6,8 @@ The Unisono application facilitates harmonizing desires among participants throu
|
|||||||
|
|
||||||
## Test Scenarios
|
## Test Scenarios
|
||||||
|
|
||||||
|
*Note on Multi-User Scenarios*: For tests involving multiple users, each user should be simulated in an isolated browser context (e.g., using `browser.newContext()` in Playwright) to ensure independent session states.
|
||||||
|
|
||||||
### 1. Authentication
|
### 1. Authentication
|
||||||
|
|
||||||
#### 1.1 Successful Login with Valid Passphrase
|
#### 1.1 Successful Login with Valid Passphrase
|
||||||
@@ -112,13 +114,14 @@ The Unisono application facilitates harmonizing desires among participants throu
|
|||||||
**Steps:**
|
**Steps:**
|
||||||
1. Create a session with `Number of Expected Responses` set to 2.
|
1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
2. Copy the session link.
|
2. Copy the session link.
|
||||||
3. **User 1:**
|
3. **User 1 (in the initial browser context):**
|
||||||
a. Enter desires into all categories.
|
a. Enter desires into all categories.
|
||||||
b. Click "Submit Desires".
|
b. Click "Submit Desires".
|
||||||
4. **User 2 (in a new browser context/page):**
|
4. **User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):**
|
||||||
a. Navigate to the copied session link.
|
a. Navigate to the copied session link.
|
||||||
b. Enter desires into all categories.
|
b. Log in with the valid `AUTH_PASSPHRASE`.
|
||||||
c. Click "Submit Desires".
|
c. Enter desires into all categories.
|
||||||
|
d. Click "Submit Desires".
|
||||||
|
|
||||||
**Expected Results:**
|
**Expected Results:**
|
||||||
- After User 1 submits, their page shows a "Waiting for other participants" message.
|
- After User 1 submits, their page shows a "Waiting for other participants" message.
|
||||||
@@ -141,15 +144,16 @@ The Unisono application facilitates harmonizing desires among participants throu
|
|||||||
**Steps:**
|
**Steps:**
|
||||||
1. Create a session with `Number of Expected Responses` set to 2.
|
1. Create a session with `Number of Expected Responses` set to 2.
|
||||||
2. Copy the session link.
|
2. Copy the session link.
|
||||||
3. **User 1:**
|
3. **User 1 (in the initial browser context):**
|
||||||
a. Enter items into "What You Want" (e.g., "User1 Want A").
|
a. Enter items into "What You Want" (e.g., "User1 Want A").
|
||||||
b. Enter items into "What You Do Not Want" (e.g., "User1 Not Want B").
|
b. Enter items into "What You Do Not Want" (e.g., "User1 Not Want B").
|
||||||
c. Click "Submit Desires".
|
c. Click "Submit Desires".
|
||||||
4. **User 2 (in a new browser context/page):**
|
4. **User 2 (in a new browser context, e.g., using `browser.newContext()` in Playwright):**
|
||||||
a. Navigate to the copied session link.
|
a. Navigate to the copied session link.
|
||||||
b. Enter items into "What You Want" (e.g., "User2 Want C").
|
b. Log in with the valid `AUTH_PASSPHRASE`.
|
||||||
c. Enter items into "What You Accept" (e.g., "User2 Accept D").
|
c. Enter items into "What You Want" (e.g., "User2 Want C").
|
||||||
d. Click "Submit Desires".
|
d. Enter items into "What You Accept" (e.g., "User2 Accept D").
|
||||||
|
e. Click "Submit Desires".
|
||||||
|
|
||||||
**Expected Results:**
|
**Expected Results:**
|
||||||
- Both users' pages transition to the "Results Display" page.
|
- Both users' pages transition to the "Results Display" page.
|
||||||
@@ -170,7 +174,7 @@ The Unisono application facilitates harmonizing desires among participants throu
|
|||||||
#### 5.2 Verify Private Desires are Not Shared
|
#### 5.2 Verify Private Desires are Not Shared
|
||||||
**Steps:**
|
**Steps:**
|
||||||
1. Follow steps for "4.2 Multi-User - All Participants Submit Desires", ensuring User 1 submits a "Afraid to Ask (Private)" item.
|
1. Follow steps for "4.2 Multi-User - All Participants Submit Desires", ensuring User 1 submits a "Afraid to Ask (Private)" item.
|
||||||
2. On User 2's results page, verify that User 1's private desire is *not* displayed.
|
2. On User 2's results page (in its separate browser context, after logging in with `AUTH_PASSPHRASE`), verify that User 1's private desire is *not* displayed.
|
||||||
|
|
||||||
**Expected Results:**
|
**Expected Results:**
|
||||||
- User 1's private desire is only visible to User 1 (if applicable, or not displayed at all on the results page).
|
- User 1's private desire is only visible to User 1 (if applicable, or not displayed at all on the results page).
|
||||||
|
|||||||
Reference in New Issue
Block a user