Skip to content

fix: longer waiting for tiles#43

Merged
raven-wing merged 3 commits into
Problematy:mainfrom
raven-wing:goodmape2etestfix
Jun 8, 2026
Merged

fix: longer waiting for tiles#43
raven-wing merged 3 commits into
Problematy:mainfrom
raven-wing:goodmape2etestfix

Conversation

@raven-wing

@raven-wing raven-wing commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Tests
    • Improved reliability of the "My Location" button test by enhancing animation detection and timeout handling to work consistently across different environments, ensuring the map correctly zooms to the user's location before verification.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@raven-wing, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 41 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da6f8ef7-c13f-41b9-928f-137f0b916f3f

📥 Commits

Reviewing files that changed from the base of the PR and between 1d9e0c7 and 0c193ca.

📒 Files selected for processing (2)
  • tests/basic/test_go_to_my_location.py
  • tests/conftest.py
📝 Walkthrough

Walkthrough

The PR improves the "My Location" button test by adding an explicit wait for the Leaflet fly-to zoom animation to complete. The test now uses page.wait_for_function to detect when the .leaflet-zoom-anim class is no longer present, with a 15-second timeout to accommodate slow headless CI environments, before asserting the tile loads at the expected zoom level.

Changes

My Location Test Animation Wait

Layer / File(s) Summary
Leaflet animation sync point
tests/basic/test_go_to_my_location.py
Test adds an explicit wait for the Leaflet zoom animation (checking for removal of .leaflet-zoom-anim) with a 15s timeout before asserting the map tile loads at the high zoom level, replacing the previous tile-load-only wait.

Possibly related PRs

  • Problematy/goodmap-e2e-tests#42: Both PRs touch the "My Location" test expectations and coordinate timing around zoom animation behavior in the same test file.

Poem

🐰 The map once raced to zoom ahead,
But now we wait for animations spread,
The .leaflet-zoom-anim must say goodbye,
Before we check the tiles fly so high! 🎯


🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: longer waiting for tiles' is partially related to the changeset. It references waiting for tiles, which is part of the change, but omits the key detail that the fix involves waiting for the Leaflet fly-to zoom animation to complete, not just longer tile loading.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/basic/test_go_to_my_location.py`:
- Around line 42-46: The current single wait using
page.wait_for_function("!document.querySelector('.leaflet-zoom-anim')",
timeout=15000) can pass immediately if the animation element is added after the
check; change to a two-phase sync: after triggering the flyTo, first wait for
the animation to start by waiting for
document.querySelector('.leaflet-zoom-anim') to be truthy (short timeout e.g.
1–2s) using page.wait_for_function, then wait for it to disappear using the
existing wait_for_function that checks for its absence (longer timeout).
Alternatively, replace the two-phase approach with an event-based wait by
injecting a page.evaluate that attaches to the Leaflet map and resolves on the
'moveend' or 'zoomend' event (listen for 'moveend'/'zoomend') and await that
promise instead of the single-selector check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2db3f7db-50fe-49eb-a3d1-5f3c1e50c280

📥 Commits

Reviewing files that changed from the base of the PR and between b2b85b7 and 1d9e0c7.

📒 Files selected for processing (1)
  • tests/basic/test_go_to_my_location.py

Comment thread tests/basic/test_go_to_my_location.py Outdated
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

🧪 E2E Test Results

📊 View full workflow run
🔗 Commit: 1d9e0c7

📊 E2E Stress Test Performance

Status: PASSED (12315.03ms max < 25000ms limit)

Metric Value
Average Time 11205.39ms
Minimum Time 10507.41ms
Maximum Time 12315.03ms
Completed Runs 5/5
Avg Markers Loaded 71
📈 Individual Run Times
Run Time (ms) Markers
Run 1 10560.4ms 71
Run 2 11458.46ms 71
Run 3 11185.64ms 71
Run 4 12315.03ms 71
Run 5 10507.41ms 71

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

🧪 E2E Test Results

📊 View full workflow run
🔗 Commit: 3ba969b

⚠️ E2E Stress Test Results

Performance data not found. See workflow logs for details.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🧪 E2E Test Results

📊 View full workflow run
🔗 Commit: 0c193ca

📊 E2E Stress Test Performance

Status: PASSED (13251.74ms max < 25000ms limit)

Metric Value
Average Time 12311.55ms
Minimum Time 11578.47ms
Maximum Time 13251.74ms
Completed Runs 5/5
Avg Markers Loaded 71
📈 Individual Run Times
Run Time (ms) Markers
Run 1 11578.47ms 71
Run 2 11883.01ms 71
Run 3 12983.14ms 71
Run 4 11861.37ms 71
Run 5 13251.74ms 71

@raven-wing raven-wing merged commit cac4085 into Problematy:main Jun 8, 2026
2 checks passed
@raven-wing raven-wing deleted the goodmape2etestfix branch June 8, 2026 00:10
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.

1 participant