Skip to content

fix(test): improve cloud sync tests to handle asynchronous loading and increase timeout - #10440

Merged
bobqiu-kong merged 22 commits into
developfrom
fix/fix-flaky-cloud-sync-tests
Aug 27, 2026
Merged

fix(test): improve cloud sync tests to handle asynchronous loading and increase timeout#10440
bobqiu-kong merged 22 commits into
developfrom
fix/fix-flaky-cloud-sync-tests

Conversation

@bobqiu-kong

@bobqiu-kong bobqiu-kong commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes an intermittent CI failure in the Cloud Sync smoke test suite, seen error

TimeoutError: locator.click: Timeout 30000ms exceeded.
waiting for getByTestId('global-navigation-sidebar').getByTestId('request-node-New Request')

The test itself (Discard, branch and commit actions in cloud-sync.test.ts:26) is unchanged in
behavior — this is purely a stability fix for the wait strategy around one step.

Root cause

After fetchUnsyncedWorkspace('My Collection R1') selects the workspace, the sidebar populates its
request tree (including the New Request row) through a separate async chain — navigation/expand
resolution → getWorkspaceChildren IPC → React Query enabling → render — with no visible loading
indicator. fetchUnsyncedWorkspace only waits for the initial pull/fetch spinner to clear and for the
workspace row to become selected; it does not wait for that second chain to finish.

The very next line, clickRequestOrFolder('New Request'), was relying on Playwright's default
30000ms action timeout (hardcoded per-call, not affected by the 60s test-level timeout in
playwright.config.ts) to absorb that entire chain. Under normal load this finishes well under 30s,
but under CI resource contention (6 parallel shards sharing one runner's CPU/disk) the chain
occasionally ran long enough to blow through the 30s budget, causing a flaky, hard-to-diagnose click
timeout.

Confirmed this is not a regression from any recent feature work — the PR the failure was observed on
(#10439) only bumps package versions and touches no
sync/sidebar code.

Changes

  • packages/insomnia-smoke-test/tests/smoke/cloud-sync.test.ts — added an explicit
    requestRow('New Request').waitFor({ state: 'visible', timeout: 60_000 }) between
    fetchUnsyncedWorkspace(...) and clickRequestOrFolder('New Request'), so the test waits on the
    actual missing signal (the row's own load) with dedicated headroom, instead of silently depending on
    the click's default 30s timeout to cover unrelated async work.

Testing

  • npx eslint packages/insomnia-smoke-test/tests/smoke/cloud-sync.test.ts — clean.
  • Plan: let this PR's CI run the 30x stress matrix above; a clean run across all 10 jobs is the
    acceptance bar before reverting the workflow file and merging.

@bobqiu-kong
bobqiu-kong enabled auto-merge (squash) August 26, 2026 04:09
Comment thread packages/insomnia-smoke-test/tests/smoke/cloud-sync.test.ts Outdated
Comment thread packages/insomnia-smoke-test/playwright/pages/components/navigation-sidebar.ts Outdated
@bobqiu-kong
bobqiu-kong merged commit 393dceb into develop Aug 27, 2026
21 checks passed
@bobqiu-kong
bobqiu-kong deleted the fix/fix-flaky-cloud-sync-tests branch August 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants