-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add test for tabs height #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
3d56e1f to
1aa8821
Compare
be82adb to
c8d970d
Compare
47f4cc6 to
064942f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 31
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| const position = await nextHeading.evaluate((el: HTMLElement) => el.offsetTop); | ||
| const delta = Math.abs(position - initialHeadingPosition); | ||
|
|
||
| expect(delta).toBe(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Overly strict position equality check causes flaky tests
The assertion expect(delta).toBe(0) requires exact pixel-perfect positioning, which is inconsistent with other similar tests in the file that use tolerances like .toBeLessThan(5) or .toBeLessThan(24). Browser sub-pixel rendering, font rendering variations, and layout calculation timing can cause minor position differences, making this test flaky. The strict equality check doesn't account for these normal rendering variations.
| --limit 20 \ | ||
| --json databaseId,status,displayTitle | \ | ||
| jq -r --arg trigger_id "$TRIGGER_ID" \ | ||
| 'map(select(.status != "completed" and (.displayTitle | contains($trigger_id)))) | .[0].databaseId // empty') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Race condition filters out fast-completing workflows
The workflow search filters for runs with .status != "completed", which excludes workflows that finish within the initial 10-second sleep period. If the parent E2E workflow completes quickly, it won't be found despite running successfully, causing this workflow to fail with "Failed to find workflow run" even though the tests passed. The filter should include completed runs or use a different approach to identify the triggered workflow.
516e43a to
fc63ecb
Compare
Note
Adds a workflow to trigger and await parent E2E tests, a new Playwright test ensuring tab switches don’t shift header position, and minor CI/script/config updates.
/.github/workflows/diplodoc-e2e-tests.yamltriggers parent repo E2E (e2e-tests.yaml), waits for completion, and posts a summary.npm i --package-lock-only --ignore-scriptsin/.github/workflows/package-lock.yaml./.github/workflows/tests.yaml(unit tests workflow).src/tests/tabs/index.ts, add helpergetTabElements, position markers, and test to maintain header position when switching tabs.playwright.config.ts, enableheadlessand settimeout: 30000.docs/input/ru/syntax/tabs.md, add sections/anchors#position-test-tabsand#position-test-targetwith sample tabs for position testing.scripts/init, skip Playwright install if cached and improve logging.Written by Cursor Bugbot for commit 064942f. This will update automatically on new commits. Configure here.