Skip to content

Commit

Permalink
Stabilize graph test (#73918)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jul 31, 2020
1 parent d51e277 commit 747e9e4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions x-pack/test/functional/apps/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('should show venn when clicking a line', async function () {
await buildGraph();
const { edges } = await PageObjects.graph.getGraphObjects();

await PageObjects.graph.isolateEdge('test', '/test/wp-admin/');

await PageObjects.graph.stopLayout();
await PageObjects.common.sleep(1000);
const testTestWpAdminBlogEdge = edges.find(
({ sourceNode, targetNode }) =>
targetNode.label === '/test/wp-admin/' && sourceNode.label === 'test'
)!;
await testTestWpAdminBlogEdge.element.click();
await browser.execute(() => {
const event = document.createEvent('SVGEvents');
event.initEvent('click', true, true);
return document.getElementsByClassName('gphEdge')[0].dispatchEvent(event);
});
await PageObjects.common.sleep(1000);
await PageObjects.graph.startLayout();

Expand Down

0 comments on commit 747e9e4

Please sign in to comment.