-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix functional test and remove commented code
- Loading branch information
1 parent
ca680ce
commit 06de36d
Showing
6 changed files
with
69 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
x-pack/test/functional/services/aiops/explain_log_rate_spikes_analysis_groups_table.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export function ExplainLogRateSpikesAnalysisGroupsTableProvider({ | ||
getService, | ||
}: FtrProviderContext) { | ||
const testSubjects = getService('testSubjects'); | ||
|
||
return new (class AnalysisTable { | ||
public async assertSpikeAnalysisTableExists() { | ||
await testSubjects.existOrFail(`aiopsSpikeAnalysisGroupsTable`); | ||
} | ||
|
||
public async parseAnalysisTable() { | ||
const table = await testSubjects.find('~aiopsSpikeAnalysisGroupsTable'); | ||
const $ = await table.parseDomContent(); | ||
const rows = []; | ||
|
||
for (const tr of $.findTestSubjects('~aiopsSpikeAnalysisGroupsTableRow').toArray()) { | ||
const $tr = $(tr); | ||
|
||
const rowObject: { | ||
group: any; | ||
docCount: number; | ||
} = { | ||
group: $tr | ||
.findTestSubject('aiopsSpikeAnalysisGroupsTableColumnGroup') | ||
.find('.euiTableCellContent') | ||
.text() | ||
.trim(), | ||
docCount: $tr | ||
.findTestSubject('aiopsSpikeAnalysisGroupsTableColumnDocCount') | ||
.find('.euiTableCellContent') | ||
.text() | ||
.trim(), | ||
}; | ||
|
||
rows.push(rowObject); | ||
} | ||
|
||
return rows; | ||
} | ||
})(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters