Suspected fix for test flake

Created on 22 May 2025, 21 days ago

Overview

I think I have figured out a reason the tests can be flakey - specifically around operations that involve the right-click context menu.

Proposed resolution

In ComponentContextMenu.tsx we have a useEffect that if the canvasViewPort is updated (x, y and scale) then the context menu should close. This is done to prevent the menu becoming mis-aligned with the location the user right clicked to initially open it.

However, cypress automatically scrolls the page often when selecting/checking elements. Even just cy.get() will scroll the target element into view if required.

When scrolling occurs, the update for the x/y position of the canvas is updated after a 250ms debounce which I think explains why the issue is flakey! In some case the test is running fast enough that it can open the menu and click the item before the scroll position updates and closes the menu.

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡¬πŸ‡§United Kingdom jessebaker

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024