component-operations.cy.js is flakey

Created on 28 February 2025, 9 days ago

Overview

This test seems to be failing pretty often on CI. Running locally seems to work pretty consistently.

Proposed resolution

I've noticed that, different to almost all of our other tests, this test uninstalls and reinstalls between each it block. Perhaps this is related?

I also observed a JS error "cannot read property 'style' of null" (or undefined, I can't remember) which I have tracked down to the useSyncIframeHeightToContent hook - the line if (element.style.height.endsWith('vh')) { in the following:

    const elements: NodeListOf<HTMLElement> = iframeHTML.querySelectorAll('*');
    elements.forEach((element: HTMLElement) => {
      if (element.style.height.endsWith('vh')) {
        const vhValue = parseFloat(element.style.height);
        const newHeight = (vhValue / 100) * height;
        element.style.maxHeight = newHeight + 'px';
        resizeIframe();
      }
    });

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