mirror of
https://github.com/openclaw/openclaw.git
synced 2026-11-16 13:08:44 +00:00
test(ui): cover first-read session navigation readiness
Exercise shared navigation as the first readiness consumer in the existing online late-readiness case. Keep the separate reload regression and every assertion, and remove the toast-specific wait now owned by the shared helper. The pre-fix helper fails the regression. Ten full recovery-file runs pass without the local wait, along with the post-integration focused checks, scoped lint/types, and P2 review.
This commit is contained in:
parent
b4c73dfc0f
commit
f3af0db8fc
2 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,6 @@ import type { ApplicationContext } from "../app/context.ts";
|
|||
import { sessionPlacementRecoveryExactStorageKey } from "../lib/sessions/session-placement-recovery-storage-key.ts";
|
||||
import type { SessionPlacementPendingRecovery } from "../lib/sessions/session-placement-recovery.ts";
|
||||
import type { ChatPageHost } from "../pages/chat/chat-state-host.ts";
|
||||
import { waitForControlUiInitialRoster } from "../test-helpers/control-ui-e2e-readiness.ts";
|
||||
import {
|
||||
navigateToControlUiSession,
|
||||
startProductionControlUiE2eServer,
|
||||
|
|
@ -383,8 +382,6 @@ suite.define(() => {
|
|||
params: { key: sessionKey, message, idempotencyKey: messageId },
|
||||
});
|
||||
if (escape === "toast") {
|
||||
// Startup replay can send before the reloaded shell publishes its readiness hook.
|
||||
await waitForControlUiInitialRoster(page);
|
||||
await navigateToControlUiSession(page, sessionKey);
|
||||
}
|
||||
await expect
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ suite.define(() => {
|
|||
}
|
||||
expect(requests).toEqual([]);
|
||||
|
||||
if (!offline) {
|
||||
await navigateToControlUiSession(page, key);
|
||||
}
|
||||
await page.waitForFunction(() => window.openclawControlUi?.snapshot().ready === true);
|
||||
const snapshot = await page.evaluate(() => window.openclawControlUi?.snapshot());
|
||||
expect(snapshot).toMatchObject({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue