Skip to content

Commit

Permalink
fix flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jul 20, 2020
1 parent 6dd6e42 commit 0e77e35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 5 additions & 2 deletions x-pack/test/functional/apps/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

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

await this.stopLayout();
await PageObjects.common.sleep(1000);
const testTestWpAdminBlogEdge = edges.find(
({ sourceNode, targetNode }) =>
targetNode.label === '/test/wp-admin/' && sourceNode.label === 'test'
)!;

await PageObjects.graph.clickEdge(testTestWpAdminBlogEdge);
await testTestWpAdminBlogEdge.element.click();
await PageObjects.common.sleep(1000);
await this.startLayout();

const vennTerm1 = await PageObjects.graph.getVennTerm1();
log.debug('vennTerm1 = ' + vennTerm1);
Expand Down
7 changes: 0 additions & 7 deletions x-pack/test/functional/page_objects/graph_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ export function GraphPageProvider({ getService, getPageObjects }: FtrProviderCon
await testSubjects.click('graphRemoveSelection');
}

async clickEdge(edge: Edge) {
await this.stopLayout();
await PageObjects.common.sleep(1000);
await edge.element.click();
await this.startLayout();
}

async stopLayout() {
if (await testSubjects.exists('graphPauseLayout')) {
await testSubjects.click('graphPauseLayout');
Expand Down

0 comments on commit 0e77e35

Please sign in to comment.