Plugins #14

Merged
myxelium merged 9 commits from Plugins into main 2026-04-29 23:18:22 +00:00
6 changed files with 11 additions and 8 deletions
Showing only changes of commit b8f6d58d99 - Show all commits

View File

@@ -141,7 +141,7 @@ async function registerUser(page: Page, username: string, displayName: string):
} }
async function installGrantAndActivatePlugin(page: Page, installFromStore: boolean): Promise<void> { async function installGrantAndActivatePlugin(page: Page, installFromStore: boolean): Promise<void> {
await page.getByRole('button', { name: 'Plugins' }).click(); await page.getByRole('button', { name: 'Plugin Store' }).click();
await expect(page).toHaveURL(/\/plugin-store/, { timeout: 20_000 }); await expect(page).toHaveURL(/\/plugin-store/, { timeout: 20_000 });
await expect(page.getByTestId('plugin-store-page')).toBeVisible({ timeout: 20_000 }); await expect(page.getByTestId('plugin-store-page')).toBeVisible({ timeout: 20_000 });

View File

@@ -23,8 +23,8 @@ test.describe('Plugin manager UI', () => {
await expect(page).toHaveURL(/\/room\//, { timeout: 30_000 }); await expect(page).toHaveURL(/\/room\//, { timeout: 30_000 });
}); });
await test.step('Open visible Plugins button', async () => { await test.step('Open visible Plugin Store button', async () => {
await page.getByRole('button', { name: 'Plugins' }).click(); await page.getByRole('button', { name: 'Plugin Store' }).click();
await expect(page).toHaveURL(/\/plugin-store/, { timeout: 10_000 }); await expect(page).toHaveURL(/\/plugin-store/, { timeout: 10_000 });
await expect(page.getByTestId('plugin-store-page')).toBeVisible({ timeout: 10_000 }); await expect(page.getByTestId('plugin-store-page')).toBeVisible({ timeout: 10_000 });
}); });

View File

@@ -415,13 +415,11 @@ export class ServerSearchComponent implements OnInit {
description: currentUser.description, description: currentUser.description,
profileUpdatedAt: currentUser.profileUpdatedAt profileUpdatedAt: currentUser.profileUpdatedAt
}); });
this.webrtc.joinRoom(server.id, currentUser.oderId || currentUser.id, wsUrl); this.webrtc.sendRawMessageToSignalUrl(wsUrl, {
this.webrtc.sendRawMessage({
type: 'server_icon_sync_request', type: 'server_icon_sync_request',
serverId: server.id, serverId: server.id,
iconUpdatedAt: 0 iconUpdatedAt: 0
}); });
window.setTimeout(() => this.webrtc.leaveRoom(server.id), 15_000);
} catch { } catch {
/* discovery icons are best-effort */ /* discovery icons are best-effort */
} }

View File

@@ -304,6 +304,11 @@ export class WebRTCService implements OnDestroy {
this.signalingTransportHandler.sendRawMessage(message); this.signalingTransportHandler.sendRawMessage(message);
} }
/** Send a raw JSON payload through a specific signaling WebSocket. */
sendRawMessageToSignalUrl(signalUrl: string, message: Record<string, unknown>): boolean {
return this.signalingTransportHandler.sendRawMessageToSignalUrl(signalUrl, message);
}
/** /**
* Track the currently-active server ID (for server-scoped operations). * Track the currently-active server ID (for server-scoped operations).
* *