Skip to content

Commit

Permalink
[Graph] Unskip graph tests (#72291)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Jul 27, 2020
1 parent 9656cbc commit 122d7fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
28 changes: 15 additions & 13 deletions x-pack/test/functional/apps/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

// FLAKY: https://github.com/elastic/kibana/issues/53749
describe.skip('graph', function () {
describe('graph', function () {
before(async () => {
await browser.setWindowSize(1600, 1000);
log.debug('load graph/secrepo data');
Expand Down Expand Up @@ -132,14 +131,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await buildGraph();
const { edges } = await PageObjects.graph.getGraphObjects();

const blogAdminBlogEdge = edges.find(
await PageObjects.graph.isolateEdge('test', '/test/wp-admin/');

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

await PageObjects.graph.isolateEdge(blogAdminBlogEdge);

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

const vennTerm1 = await PageObjects.graph.getVennTerm1();
log.debug('vennTerm1 = ' + vennTerm1);
Expand All @@ -156,11 +158,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const smallVennTerm2 = await PageObjects.graph.getSmallVennTerm2();
log.debug('smallVennTerm2 = ' + smallVennTerm2);

expect(vennTerm1).to.be('/blog/wp-admin/');
expect(vennTerm2).to.be('blog');
expect(smallVennTerm1).to.be('5');
expect(smallVennTerm12).to.be(' (5) ');
expect(smallVennTerm2).to.be('8');
expect(vennTerm1).to.be('/test/wp-admin/');
expect(vennTerm2).to.be('test');
expect(smallVennTerm1).to.be('4');
expect(smallVennTerm12).to.be(' (4) ');
expect(smallVennTerm2).to.be('4');
});

it('should delete graph', async function () {
Expand Down
12 changes: 1 addition & 11 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 All @@ -109,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 122d7fe

Please sign in to comment.