mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Graph] Unskip graph tests (#72291)
This commit is contained in:
parent
9656cbcbe7
commit
122d7fe18f
2 changed files with 16 additions and 24 deletions
|
@ -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');
|
||||
|
@ -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);
|
||||
|
@ -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 () {
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue