Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML][AIOPS] Log rate analysis: add basic functional test #199054

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions x-pack/test/functional/apps/aiops/log_rate_analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
testData.dataGenerator
);

if (testData.editedQuery && testData.query) {
await aiops.logRateAnalysisPage.setQueryInput(testData.editedQuery);
await aiops.logRateAnalysisPage.assertRerunAnalysisButtonExists(true);
await aiops.logRateAnalysisPage.setQueryInput(testData.query);
}

// At this stage the baseline and deviation brush position should be stored in
// the url state and a full browser refresh should restore the analysis.
await browser.refresh();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const farequoteDataViewTestDataWithQuery: TestData = {
fieldSelectorSearch: 'airline',
fieldSelectorApplyAvailable: true,
query: 'NOT airline:("SWR" OR "ACA" OR "AWE" OR "BAW" OR "JAL" OR "JBU" OR "JZA" OR "KLM")',
editedQuery: 'NOT airline:("SWR")',
expected: {
totalDocCountFormatted: '48,799',
analysisGroupsTable: [
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/aiops/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface TestData {
fieldSelectorSearch: string;
fieldSelectorApplyAvailable: boolean;
query?: string;
editedQuery?: string;
action?: TestDataTableActionLogPatternAnalysis;
expected: TestDataExpectedWithSampleProbability | TestDataExpectedWithoutSampleProbability;
}