test(frontend): await diagram data before search assertion (deflake main) - #738
test(frontend): await diagram data before search assertion (deflake main)#738seonghobae wants to merge 3 commits into
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
Pull request was converted to draft
…mer tests Same race as the diagram-search flake: four tests click the first 열기 button immediately after navigating to 다이어그램, before the async snapshot list has rendered. Wait for the buttons (real timers) before enabling fake timers, matching the guard already used elsewhere in this file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review Please review exact current head |
|
@opencode-agent Please review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected='60b482da234158ab0aca53a5f4a4c1da46127fcc'
actual="$(git rev-parse HEAD)"
printf 'HEAD=%s\nEXPECTED=%s\n' "$actual" "$expected"
if [ "$actual" != "$expected" ]; then
echo 'ERROR: checked-out HEAD does not match the requested commit' >&2
exit 1
fi
echo '--- changed files and diff against first parent ---'
git diff --stat HEAD^ HEAD
git diff --find-renames --unified=80 HEAD^ HEAD -- frontend/src/App.coverage.test.tsx
echo '--- AST outline: affected test file ---'
ast-grep outline frontend/src/App.coverage.test.tsx --items all --view expanded
echo '--- empty-state and diagram search references ---'
rg -n -C 4 --glob '*.{ts,tsx}' \
'아직 다이어그램 스냅샷이 없습니다|다이어그램 검색' frontendLength of output: 20002 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- commit metadata ---'
git show -s --format='commit=%H%nparent=%P%nsubject=%s%nbody=%b' HEAD
echo '--- diagram-search test: parent versus current ---'
for revision in HEAD^ HEAD; do
echo "### $revision: frontend/src/App.coverage.test.tsx Lines 315-342"
git show "${revision}:frontend/src/App.coverage.test.tsx" | sed -n '315,342p'
done
echo '--- current changed test blocks ---'
sed -n '585,790p' frontend/src/App.coverage.test.tsx
echo '--- test setup and async API mocks ---'
sed -n '248,315p' frontend/src/App.coverage.test.tsx
echo '--- PR metadata ---'
gh pr view 738 --repo ContextualWisdomLab/pg-erd-cloud \
--json number,title,baseRefOid,headRefOid,commits \
--jq '{number,title,baseRefOid,headRefOid,commits:[.commits[]|{oid:.oid,messageHeadline:.messageHeadline}]}'Length of output: 17183 🏁 Script executed: #!/bin/bash
set -euo pipefail
base='72afe6db712b145baaba084f64a1ff4fb36d9fd0'
head='60b482da234158ab0aca53a5f4a4c1da46127fcc'
echo '--- complete PR diff: base to requested head ---'
git diff --check "$base" "$head"
git diff --stat "$base" "$head"
git diff --unified=30 "$base" "$head" -- frontend/src/App.coverage.test.tsx
echo '--- readiness-guard pattern in the coverage test ---'
rg -n -C 2 --glob 'App.coverage.test.tsx' \
"waitFor\\(\\(\\) => expect\\(screen\\.getAllByRole\\('button', \\{ name: '열기' \\}\\)\\.length\\)\\.toBeGreaterThan\\(0\\)\\)" \
frontend/src
echo '--- current PR check summary ---'
gh pr checks 738 --repo ContextualWisdomLab/pg-erd-cloudLength of output: 20630
No findings remain. The PR waits for snapshot-list readiness before the diagram search. It also applies the same guard before fake timers in related diagram-opening tests. The complete base-to-head diff only changes [approve] You are interacting with an AI system. |
|
@cwl-noema-review Please independently review exact current head |
Pull request was converted to draft
|
@opencode-agent Please review exact head |
|
@cwl-noema-review Please independently review exact head |
|
@opencode-agent @cwl-noema-review Please independently review exact current head |
|
@opencode-agent @cwl-noema-review Please perform a fresh independent review of current head |
Summary
The test
navigates dashboard, project, and diagram states including empty/search branchesinfrontend/src/App.coverage.test.tsxis flaky onmain: it fires the diagram search (fireEvent.changeon다이어그램 검색) before the async snapshot list has loaded, so the assertion intermittently sees the empty state instead of search results. This has been failing the frontend job on unrelated PRs — e.g. the docs-only #735.Fix
Cherry-pick of the single test hunk from commit 06a7eae on #700 (
bolt/optimize-handle-lookup-17383827529551263442):await waitForfor the empty-state text (아직 다이어그램 스냅샷이 없습니다...) to disappear before firing the search.waitForwas already imported.#700 is still open with checks stalled, so this lands the deflake standalone to stop the queue-wide flake; #700's own copy of the hunk will no-op on merge.
🤖 Generated with Claude Code