test(18-01): add INT-01 Settings button opens modal test
- Create session-settings test directory - Add Playwright test for Settings button opening modal - Verify modal form elements: privacy select, description, Save/Cancel buttons - Follow existing test patterns from chat-button.spec.ts
This commit is contained in:
parent
815e0a6099
commit
c137cb1ee8
|
|
@ -0,0 +1,39 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
import { loginToJamUI, createAndJoinSession } from '../utils/test-helpers';
|
||||
|
||||
test.describe('Session Settings Modal', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await loginToJamUI(page);
|
||||
await createAndJoinSession(page);
|
||||
});
|
||||
|
||||
test('INT-01: Settings button opens modal', async ({ page }) => {
|
||||
// Locate Settings button by the gear icon alt text
|
||||
const settingsButton = page.locator('img[alt="Settings"]');
|
||||
await expect(settingsButton).toBeVisible();
|
||||
|
||||
// Click the Settings button
|
||||
await settingsButton.click();
|
||||
|
||||
// Verify modal opens with "Session Settings" header
|
||||
const modalHeader = page.locator('text=Session Settings');
|
||||
await expect(modalHeader).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Verify form elements are visible
|
||||
// Privacy select dropdown
|
||||
const privacySelect = page.locator('[data-testid="session-privacy"]');
|
||||
await expect(privacySelect).toBeVisible();
|
||||
|
||||
// Description textarea
|
||||
const descriptionTextarea = page.locator('textarea[name="description"]');
|
||||
await expect(descriptionTextarea).toBeVisible();
|
||||
|
||||
// Save button
|
||||
const saveButton = page.locator('button:has-text("Save")');
|
||||
await expect(saveButton).toBeVisible();
|
||||
|
||||
// Cancel button
|
||||
const cancelButton = page.locator('button:has-text("Cancel")');
|
||||
await expect(cancelButton).toBeVisible();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue