feat: dashboard
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user