26 lines
1.2 KiB
TypeScript
26 lines
1.2 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Copy Link Feature', () => {
|
|
test('Verify Copy Link Button Functionality', async ({ page }) => {
|
|
// Ensure a session has been successfully 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('Test Session for Copy Link');
|
|
await page.getByRole('textbox', { name: 'Details (Optional)' }).fill('Testing the copy link feature');
|
|
await page.getByRole('spinbutton', { name: 'Number of Expected Responses' }).fill('2');
|
|
await page.getByRole('button', { name: 'Start Session' }).click();
|
|
await page.waitForURL(/.*\/session\/.*/);
|
|
|
|
// 2. Click the "Copy Link" button.
|
|
await page.getByRole('button', { name: 'Copy Link' }).click();
|
|
|
|
// Expected Results:
|
|
// - A success message (e.g., "Link copied to clipboard!") is displayed.
|
|
await expect(page.getByText('Link copied to clipboard!')).toBeVisible();
|
|
|
|
|
|
});
|
|
});
|