• keppo-bot[bot]'s avatar
    test: deflake setup and context E2E flows (#3319) · 30300641
    keppo-bot[bot] 提交于
    ## Summary
    - Deflake setup-flow E2E by clearing the fake OPENAI_API_KEY when a test
    explicitly wants the setup screen.
    - Update custom provider key setup to wait for the saved masked key UI
    instead of the raw secret text.
    - Wait for Smart Context settings persistence and give cloud sandbox
    undo enough time to finish snapshot reconciliation.
    
    ## Root cause
    Run: https://github.com/dyad-sh/dyad/actions/runs/25189808932
    
    The red setup-flow failure was caused by two test assumptions drifting
    from app behavior. The setup-screen fixture could inherit OPENAI_API_KEY
    from an earlier test in the same worker, causing the setup banner to
    disappear. The provider helper also waited for the full raw test API
    key, while the app now saves and renders the key masked as test...2345.
    
    Two retry-only flakes were separate E2E timing contracts: the Smart
    Context test sent the next dump prompt before the off setting was
    persisted, and cloud sandbox undo could still be syncing/restarting when
    the digest poll hit the LONG timeout.
    
    ## Why this fix is correct
    - Tests that opt into showSetupScreen now get an environment without the
    fake OpenAI key, matching the setup-screen contract.
    - The provider helper waits for the persisted saved-key state the UI
    actually exposes, without asserting raw secret text.
    - The Smart Context test waits on the settings file before sending the
    prompt that depends on it.
    - Cloud sandbox undo already uses EXTRA_LONG for preview startup;
    applying the same budget to undo reconciliation matches the slower cloud
    path seen in CI.
    
    ## Test plan
    - npm run fmt && npm run lint:fix && npm run ts
    - npm test
    - PYTHON=/usr/bin/python3 npm run build
    - PLAYWRIGHT_HTML_OPEN=never npm run e2e -- e2e-tests/setup_flow.spec.ts
    - PLAYWRIGHT_HTML_OPEN=never npm run e2e --
    e2e-tests/context_manage.spec.ts e2e-tests/cloud_sandbox.spec.ts
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    ---------
    Co-authored-by: 's avatarWill Chen <7344640+wwwillchen@users.noreply.github.com>
    30300641
名称
最后提交
最后更新
.agents 正在载入提交数据...
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
plans 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.npmrc 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...
vitest.eval.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...