I am trying to test a google maps components with help of Cypress's new component testing functionality.
The issue that I am faced with is that I am struggling to attach google maps to the page.
Currently, component has an initiator method which mounts google maps to the header, which works great when loading a page as normal, but it doesn't work within Cypress test.
Is there an example of how similar can be achieve?
Example test file, all I did was:
it('...', () => {
mount(myComponent)
});
To load google maps I use:
let script = document.createElement("script");
script.src = url;
document.head.appendChild(script);
. I've added an example to the comment.
– Vlad Vladimir Hercules Oct 14 '21 at 22:41