feat: dashboard

This commit is contained in:
2026-06-05 01:25:16 +02:00
parent 147858de2f
commit 2f6c52e73c
73 changed files with 3490 additions and 1061 deletions

View File

@@ -249,7 +249,7 @@ async function createSingleClientChatScenario(createClient: () => Promise<Client
credentials.password
);
await expect(client.page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
return {
client,
@@ -288,7 +288,7 @@ async function createChatScenario(createClient: () => Promise<Client>): Promise<
aliceCredentials.password
);
await expect(alice.page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(alice.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
await bobRegisterPage.goto();
await bobRegisterPage.register(
@@ -297,7 +297,7 @@ async function createChatScenario(createClient: () => Promise<Client>): Promise<
bobCredentials.password
);
await expect(bob.page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(bob.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
const aliceSearchPage = new ServerSearchPage(alice.page);

View File

@@ -51,9 +51,9 @@ test.describe('Direct message flow', () => {
const scenario = await createDmScenario(createClient);
await disableLastViewedChatResume(scenario.alice.page);
await scenario.alice.page.goto('/search', { waitUntil: 'domcontentloaded' });
await expect(scenario.alice.page).toHaveURL(/\/search/, { timeout: 20_000 });
await expect(scenario.alice.page.locator('app-server-search')).toBeVisible({ timeout: 20_000 });
await scenario.alice.page.goto('/people', { waitUntil: 'domcontentloaded' });
await expect(scenario.alice.page).toHaveURL(/\/people/, { timeout: 20_000 });
await expect(scenario.alice.page.locator('app-find-people')).toBeVisible({ timeout: 20_000 });
await expect(scenario.alice.page.locator('app-user-search-list')).toBeVisible({ timeout: 20_000 });
const bobPeopleCard = scenario.alice.page
.locator('app-user-search-list [data-testid$="-' + scenario.bobUserId + '"]', { hasText: 'Bob' })
@@ -119,7 +119,7 @@ async function registerUser(page: Page, username: string, displayName: string):
await registerPage.goto();
await registerPage.register(username, displayName, 'TestPass123!');
await expect(page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
}
async function openDmFromRoomUserCard(page: Page, displayName: string): Promise<void> {

View File

@@ -140,7 +140,7 @@ async function registerUser(page: Page, username: string, displayName: string, p
await registerPage.goto();
await registerPage.register(username, displayName, password);
await expect(page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
}
async function installDesktopNotificationSpy(page: Page): Promise<void> {

View File

@@ -380,7 +380,7 @@ async function registerUser(client: PersistentClient): Promise<void> {
await retryTransientNavigation(() => registerPage.goto());
await registerPage.register(client.user.username, client.user.displayName, client.user.password);
await expect(client.page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
}
async function joinServerFromSearch(page: Page, serverName: string): Promise<void> {

View File

@@ -142,11 +142,11 @@ test.describe('Server icon sync', () => {
await test.step('Dave has not joined, but discovery loads the icon through a temporary peer sync', async () => {
await registerUser(dave);
await stripServerIconFromDirectorySearch(dave.page, serverName);
await dave.page.goto('/search', { waitUntil: 'domcontentloaded' });
await dave.page.goto('/servers', { waitUntil: 'domcontentloaded' });
await new ServerSearchPage(dave.page).searchInput.fill(serverName);
await expectSearchResultIcon(dave.page, serverName, icon.dataUrl);
await expect(dave.page).toHaveURL(/\/search/);
await expect(dave.page).toHaveURL(/\/servers/);
});
} finally {
await Promise.all(
@@ -209,7 +209,7 @@ async function registerUser(client: PersistentClient): Promise<void> {
await retryTransientNavigation(() => registerPage.goto());
await registerPage.register(client.user.username, client.user.displayName, client.user.password);
await expect(client.page).toHaveURL(/\/search/, { timeout: 15_000 });
await expect(client.page).toHaveURL(/\/dashboard/, { timeout: 15_000 });
}
async function joinServerFromSearch(page: Page, serverName: string): Promise<void> {
@@ -403,7 +403,7 @@ async function expectRailIcon(page: Page, serverName: string, expectedDataUrl: s
}
async function expectSearchResultIcon(page: Page, serverName: string, expectedDataUrl: string): Promise<void> {
const serverCard = page.locator('app-server-search div[title]', { hasText: serverName }).first();
const serverCard = page.locator('app-server-browser div[title]', { hasText: serverName }).first();
const image = serverCard.locator('[style*="background-image"]').first();
await expect(serverCard).toBeVisible({ timeout: 20_000 });