Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

v1.4.0

Choose a tag to compare

@trotzig trotzig released this 13 Jun 09:04

This minor release adds support for a new transformDOM option to happoScreenshot. Use it to transform the DOM before it is sent to Happo for screenshooting. Here's an example where iframes are replaced with placeholders:

cy.get('.main').happoScreenshot({
  component: 'Main', 
  transformDOM: {
    selector: 'iframe',
    transform: (element, doc) => {
      // element here is an iframe
      const div = doc.createElement('div');
      div.innerHTML = '[iframe placeholder]';
      return div; // return the element you want to replace the iframe with
    }
  },
});