forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated fixture in alerting functional test to NP
- Loading branch information
Showing
5 changed files
with
86 additions
and
16 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/kibana.json
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,9 @@ | ||
{ | ||
"id": "alerting_fixture", | ||
"version": "1.0.0", | ||
"kibanaVersion": "kibana", | ||
"configPath": ["xpack"], | ||
"requiredPlugins": ["alerting"], | ||
"server": true, | ||
"ui": true | ||
} |
9 changes: 9 additions & 0 deletions
9
x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/index.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,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { AlertingFixturePlugin } from './plugin'; | ||
|
||
export const plugin = () => new AlertingFixturePlugin(); |
35 changes: 35 additions & 0 deletions
35
x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/plugin.tsx
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,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { Plugin, CoreSetup } from 'kibana/public'; | ||
import { PluginSetupContract as AlertingSetup } from '../../../../../../plugins/alerting/public'; | ||
import { AlertType, SanitizedAlert } from '../../../../../../plugins/alerting/common'; | ||
|
||
export type Setup = void; | ||
export type Start = void; | ||
|
||
export interface AlertingExamplePublicSetupDeps { | ||
alerting: AlertingSetup; | ||
} | ||
|
||
export class AlertingFixturePlugin implements Plugin<Setup, Start, AlertingExamplePublicSetupDeps> { | ||
public setup(core: CoreSetup, { alerting }: AlertingExamplePublicSetupDeps) { | ||
alerting.registerNavigation( | ||
'test.noop', | ||
'consumer.noop', | ||
(alert: SanitizedAlert, alertType: AlertType) => ({ | ||
state: { | ||
// LOLs | ||
alert: JSON.parse(JSON.stringify(alert)), | ||
alertType: JSON.parse(JSON.stringify(alertType)), | ||
}, | ||
}) | ||
); | ||
} | ||
|
||
public start() {} | ||
public stop() {} | ||
} |
10 changes: 10 additions & 0 deletions
10
x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/server/index.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,10 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { PluginInitializer } from 'kibana/server'; | ||
import { AlertingFixturePlugin } from './plugin'; | ||
|
||
export const plugin: PluginInitializer<void, void> = () => new AlertingFixturePlugin(); |
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