This repository was archived by the owner on Jan 8, 2025. It is now read-only.
This repository was archived by the owner on Jan 8, 2025. It is now read-only.
any postMessage to TestSwarm kills the test iframe #272
Open
Description
Our tests use some parent.postMessage which usually points to ourselves (since we are the topmost)
However, in an iFrame scenario, that postMessage will post to TestSwarm. In this case, TestSwarm is configured to send anything to the server; on success, it kills the iFrame.
This causes the test to never resolve as it never posts its result back.
I agree my test should not post to a parent that it is not aware of, but at least, my test could fail instead of silently be stopped.
A mechanism should be in place to listen to a specific set of message such as
__TESTSWARM__restOfMessage
When run.js reads the message, if the first bytes don't start with that string constant, you could ignore the message.