feat: dashboard
This commit is contained in:
@@ -105,7 +105,7 @@ async function createVoiceScenario(
|
||||
|
||||
await registerPage.goto();
|
||||
await registerPage.register(client.username, client.displayName, USER_PASSWORD);
|
||||
await expect(client.page).toHaveURL(/\/search/, { timeout: 20_000 });
|
||||
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 20_000 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ test.describe('Direct private calls', () => {
|
||||
|
||||
await test.step('Alice starts a call from the search people card', async () => {
|
||||
await disableLastViewedChatResume(scenario.alice.page);
|
||||
await scenario.alice.page.goto('/search', { waitUntil: 'domcontentloaded' });
|
||||
await scenario.alice.page.goto('/people', { waitUntil: 'domcontentloaded' });
|
||||
await expect(scenario.alice.page.locator('app-user-search-list')).toBeVisible({ timeout: 20_000 });
|
||||
|
||||
const bobPeopleCard = scenario.alice.page.locator(`[data-testid="user-card-${scenario.bobUserId}"]`, { hasText: 'Bob' }).first();
|
||||
@@ -597,12 +597,12 @@ async function registerUser(page: Page, username: string, displayName: string):
|
||||
|
||||
await registerPage.goto();
|
||||
await registerPage.register(username, displayName, USER_PASSWORD);
|
||||
await expect(page).toHaveURL(/\/search/, { timeout: 20_000 });
|
||||
await expect(page).toHaveURL(/\/dashboard/, { timeout: 20_000 });
|
||||
}
|
||||
|
||||
async function startCallFromSearch(page: Page, userId: string, displayName: string): Promise<void> {
|
||||
await disableLastViewedChatResume(page);
|
||||
await page.goto('/search', { waitUntil: 'domcontentloaded' });
|
||||
await page.goto('/people', { waitUntil: 'domcontentloaded' });
|
||||
const peopleCard = page.locator(`[data-testid="user-card-${userId}"]`, { hasText: displayName }).first();
|
||||
|
||||
await expect(peopleCard).toBeVisible({ timeout: 20_000 });
|
||||
|
||||
@@ -136,7 +136,7 @@ test.describe('Mixed signal-config voice', () => {
|
||||
await registerPage.goto();
|
||||
await registerPage.serverSelect.selectOption(registrationEndpointId);
|
||||
await registerPage.register(client.user.username, client.user.displayName, client.user.password);
|
||||
await expect(client.page).toHaveURL(/\/search/, { timeout: 20_000 });
|
||||
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 20_000 });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -556,18 +556,13 @@ async function installDeterministicVoiceSettings(page: Page): Promise<void> {
|
||||
}
|
||||
|
||||
async function openSearchView(page: Page): Promise<void> {
|
||||
const searchInput = page.getByPlaceholder('Search servers and users...');
|
||||
|
||||
if (await searchInput.isVisible().catch(() => false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await page.locator('button[title="Create Server"]').click();
|
||||
await expect(searchInput).toBeVisible({ timeout: 20_000 });
|
||||
await page.goto('/servers', { waitUntil: 'domcontentloaded' });
|
||||
await expect(page.getByPlaceholder('Search servers...')).toBeVisible({ timeout: 20_000 });
|
||||
}
|
||||
|
||||
async function joinRoomFromSearch(page: Page, roomName: string): Promise<void> {
|
||||
const searchInput = page.getByPlaceholder('Search servers and users...');
|
||||
await page.goto('/servers', { waitUntil: 'domcontentloaded' });
|
||||
const searchInput = page.getByPlaceholder('Search servers...');
|
||||
|
||||
await expect(searchInput).toBeVisible({ timeout: 20_000 });
|
||||
await searchInput.fill(roomName);
|
||||
|
||||
@@ -71,7 +71,7 @@ test.describe('Dual-signal multi-user voice', () => {
|
||||
await registerPage.goto();
|
||||
await registerPage.serverSelect.selectOption(PRIMARY_SIGNAL_ID);
|
||||
await registerPage.register(client.user.username, client.user.displayName, client.user.password);
|
||||
await expect(client.page).toHaveURL(/\/search/, { timeout: 20_000 });
|
||||
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 20_000 });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -319,18 +319,13 @@ async function installDeterministicVoiceSettings(page: Page): Promise<void> {
|
||||
}
|
||||
|
||||
async function openSearchView(page: Page): Promise<void> {
|
||||
const searchInput = page.getByPlaceholder('Search servers and users...');
|
||||
|
||||
if (await searchInput.isVisible().catch(() => false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
await page.locator('button[title="Create Server"]').click();
|
||||
await expect(searchInput).toBeVisible({ timeout: 20_000 });
|
||||
await page.goto('/servers', { waitUntil: 'domcontentloaded' });
|
||||
await expect(page.getByPlaceholder('Search servers...')).toBeVisible({ timeout: 20_000 });
|
||||
}
|
||||
|
||||
async function joinRoomFromSearch(page: Page, roomName: string): Promise<void> {
|
||||
const searchInput = page.getByPlaceholder('Search servers and users...');
|
||||
await page.goto('/servers', { waitUntil: 'domcontentloaded' });
|
||||
const searchInput = page.getByPlaceholder('Search servers...');
|
||||
|
||||
await expect(searchInput).toBeVisible({ timeout: 20_000 });
|
||||
await searchInput.fill(roomName);
|
||||
|
||||
@@ -64,8 +64,8 @@ test.describe('Full user journey: register -> server -> voice chat', () => {
|
||||
await expect(registerPage.submitButton).toBeVisible();
|
||||
await registerPage.register(ALICE.username, ALICE.displayName, ALICE.password);
|
||||
|
||||
// After registration, app should navigate to /search
|
||||
await expect(alice.page).toHaveURL(/\/search/, { timeout: 15_000 });
|
||||
// After registration, app should navigate to /dashboard
|
||||
await expect(alice.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
|
||||
});
|
||||
|
||||
await test.step('Bob registers an account', async () => {
|
||||
@@ -75,7 +75,7 @@ test.describe('Full user journey: register -> server -> voice chat', () => {
|
||||
await expect(registerPage.submitButton).toBeVisible();
|
||||
await registerPage.register(BOB.username, BOB.displayName, BOB.password);
|
||||
|
||||
await expect(bob.page).toHaveURL(/\/search/, { timeout: 15_000 });
|
||||
await expect(bob.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
|
||||
});
|
||||
|
||||
// ── Step 2: Alice creates a server ───────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user