I am trying to provide E2E tests using protractor. I can simulate select,click,etc events on a node but how can I simulate a button click on a selectionAdorrnmentTemplate for a given node.
Example selecting node with a selectionAdornmentTemplate:
var diagram = go.Diagram.fromDiv(diagramId);
var entity = diagram.model.nodeDataArray.filter(filterByCategory);
var node = diagram.findNodeForData(entity);
diagram.select(node);
Yes I have read the other posts and am following in a similar approach with respect to Selenium. However how can I programmatically click a button that is part of a nodes selectionAdornmentTemplate?
I am trying to work with E2E also.
can someone explain how to make this work?
var diagram = go.Diagram.fromDiv(diagramId);
I tried to do this
> var diagram = go.Diagram.fromDiv( “diagramdiv”);
how do I get reference to go.diagram via protractor?
I don’t know Protractor, so I cannot answer your question.
But I would think that it would offer access to any HTML DOM element in the page. And even if it didn’t, you should be able to refer to the diagram Div’'s id.