Skip to content

Commit

Permalink
stabilize graph test more
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jul 20, 2020
1 parent 5690c45 commit 6dd6e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await buildGraph();
const { edges } = await PageObjects.graph.getGraphObjects();

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

const testTestWpAdminBlogEdge = edges.find(
({ sourceNode, targetNode }) =>
targetNode.label === '/test/wp-admin/' && sourceNode.label === 'test'
)!;

await PageObjects.graph.isolateEdge(testTestWpAdminBlogEdge);

await PageObjects.graph.clickEdge(testTestWpAdminBlogEdge);

const vennTerm1 = await PageObjects.graph.getVennTerm1();
Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/functional/page_objects/graph_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ export function GraphPageProvider({ getService, getPageObjects }: FtrProviderCon
return [this.getPositionAsString(x1, y1), this.getPositionAsString(x2, y2)];
}

async isolateEdge(edge: Edge) {
const from = edge.sourceNode.label;
const to = edge.targetNode.label;

async isolateEdge(from: string, to: string) {
// select all nodes
await testSubjects.click('graphSelectAll');

Expand Down

0 comments on commit 6dd6e42

Please sign in to comment.