test: repair broken tests
This commit is contained in:
@@ -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 });
|
||||||
|
|
||||||
|
|||||||
@@ -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 });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ export class ServerIcons1000000000009 implements MigrationInterface {
|
|||||||
await queryRunner.query(`DROP TABLE "servers"`);
|
await queryRunner.query(`DROP TABLE "servers"`);
|
||||||
await queryRunner.query(`ALTER TABLE "servers_without_icons" RENAME TO "servers"`);
|
await queryRunner.query(`ALTER TABLE "servers_without_icons" RENAME TO "servers"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,4 @@
|
|||||||
<p class="mt-2 text-sm text-muted-foreground">The plugin page is not registered or the plugin is not loaded.</p>
|
<p class="mt-2 text-sm text-muted-foreground">The plugin page is not registered or the plugin is not loaded.</p>
|
||||||
</section>
|
</section>
|
||||||
}
|
}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -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 */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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).
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user