Skip to content

Test hangs on returning domSnapshot #207

@andrzej-woof

Description

@andrzej-woof

The problem

I deal with a bit bloated DOM, where result of PercyDOM.serialize(options) is over 6MB.
When I run testcafe with percySnapshot it hangs at

    let { domSnapshot, url } = await t.eval(() => ({
      /* eslint-disable-next-line no-undef */
      domSnapshot: PercyDOM.serialize(options),
      url: document.URL
    }), { boundTestRun: t, dependencies: { options } });

If I run PercyDOM.serialize in browser console it works blazing fast, and apparently testcafe has a problem with returning larger objects from client function. Not sure what would be the best way to address it, maybe using something like JSzip before returning serialized snapshot to compress it.

Environment

  • Node version: v14.18.1
  • @percy/cli version: 1.0.0-beta.76
  • @percy/testcafe version: 1.0.1
  • OS version: MacOS Monterey 12.2.1
  • Type of shell command-line [interface]: zsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions