Skip to content

Conversation

@RoboErikG
Copy link
Contributor

Fixes #468

It appears the blocks used in the test shifted positions slightly leading to two issues with the tests.

  1. Generating a click event on the workspace was landing on one of the blocks in the stack, which broke an assumption that focus would be on the workspace. This was fixed by clicking a specific block instead.
  2. Clicking on a block that was slightly out of the window's viewport was generating a click event that the browser ignored. This was fixed by scrolling the block into view before trying to click it.

This PR also has a couple minor non-functional tweaks for correctness:

  1. Changes to using 0 instead of 1 for the mouse button options (left button instead of middle).
  2. Moves the fallback to getting the block's root svg inside the check that the block exists.

@RoboErikG RoboErikG requested a review from a team as a code owner April 25, 2025 19:21
@RoboErikG RoboErikG requested review from BenHenning and removed request for a team April 25, 2025 19:21
@RoboErikG
Copy link
Contributor Author

This seems to be necessary but not sufficient. There was a previous issue as stated in the PR description, but after syncing to head there's also a new issue that causes the same failures.

Please review this change as is and I'll look into fixing the second issue separately.

Copy link
Collaborator

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @RoboErikG! These fixes seem reasonable.

@RoboErikG RoboErikG merged commit 548bd11 into RaspberryPiFoundation:main Apr 28, 2025
11 of 14 checks passed
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.

Tests failing due to changes in core

2 participants