test(app): align startup splash and host-page tests with desktop settings IPC

- Add testID="startup-splash" to the simplified splash screen so e2e helpers
  can detect desktop daemon bootstrap without depending on removed copy.
- Update startup-dsl helper to assert the testID instead of the deprecated
  "Starting local server..." text.
- Replace the obsolete localStorage write for manageBuiltInDaemon in the
  local-daemon sidebar test with a get_desktop_settings IPC mock so the
  desktop bridge surfaces the seeded host without triggering bootstrap.
This commit is contained in:
Mohamed Boudra
2026-04-26 23:43:14 +07:00
parent 29689b15f0
commit 175685a912
3 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ class StartupAssertions {
} }
async expectsDesktopDaemonStartup(): Promise<this> { async expectsDesktopDaemonStartup(): Promise<this> {
await expect(this.page.getByText("Starting local server...", { exact: true })).toBeVisible({ await expect(this.page.getByTestId("startup-splash")).toBeVisible({
timeout: 15_000, timeout: 15_000,
}); });
return this; return this;
+9 -6
View File
@@ -129,13 +129,10 @@ test.describe("Settings host page", () => {
const serverId = getSeededServerId(); const serverId = getSeededServerId();
// Simulate the Electron desktop bridge so `useIsLocalDaemon` resolves the // Simulate the Electron desktop bridge so `useIsLocalDaemon` resolves the
// seeded host to the local daemon. `manageBuiltInDaemon: false` bypasses // seeded host to the local daemon. `manageBuiltInDaemon: false` (returned
// the desktop bootstrap flow so only the sidebar's status query runs. // from get_desktop_settings) bypasses the desktop bootstrap flow so only
// the sidebar's status query runs against the seeded test daemon.
await page.addInitScript((localServerId) => { await page.addInitScript((localServerId) => {
localStorage.setItem(
"@paseo:app-settings",
JSON.stringify({ theme: "auto", manageBuiltInDaemon: false, sendBehavior: "interrupt" }),
);
(window as unknown as { paseoDesktop: unknown }).paseoDesktop = { (window as unknown as { paseoDesktop: unknown }).paseoDesktop = {
platform: "darwin", platform: "darwin",
invoke: async (command: string) => { invoke: async (command: string) => {
@@ -152,6 +149,12 @@ test.describe("Settings host page", () => {
error: null, error: null,
}; };
} }
if (command === "get_desktop_settings") {
return {
releaseChannel: "stable",
daemon: { manageBuiltInDaemon: false, keepRunningAfterQuit: true },
};
}
return null; return null;
}, },
getPendingOpenProject: async () => null, getPendingOpenProject: async () => null,
@@ -392,7 +392,7 @@ export function StartupSplashScreen({ bootstrapState }: StartupSplashScreenProps
if (!isError) { if (!isError) {
return ( return (
<View style={styles.container}> <View testID="startup-splash" style={styles.container}>
<TitlebarDragRegion /> <TitlebarDragRegion />
<LogoShimmer /> <LogoShimmer />
</View> </View>