I have an angular 7 app. I'm using cypress to test a few canvas/map components. I need to call a function within a component to verify the geojson being displayed on the map.
While in chrome I call ng.probe($0).componentInstance.draw.getAll() via the console and I my data gets logged to the console but when I make the same call in my cypress test:
cy.window().then((win) => {
const res = win.ng.probe($0).componentInstance.draw.getAll();
console.log(res);
})
I get ReferenceError: $0 is not defined
How would I go about calling my angular function within cypress?
