-
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.
Merge branch '8.10' into backport/8.10/pr-164122
- Loading branch information
Showing
67 changed files
with
1,005 additions
and
841 deletions.
There are no files selected for viewing
Binary file modified
BIN
+1.5 KB
(100%)
docs/user/alerting/images/rule-types-es-query-conditions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
77 changes: 77 additions & 0 deletions
77
...ackages/kbn-elastic-assistant/impl/connectorland/connector_missing_callout/index.test.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,77 @@ | ||
/* | ||
* 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 React from 'react'; | ||
|
||
import { render } from '@testing-library/react'; | ||
import { ConnectorMissingCallout } from '.'; | ||
import { AssistantAvailability } from '../../..'; | ||
import { TestProviders } from '../../mock/test_providers/test_providers'; | ||
|
||
describe('connectorMissingCallout', () => { | ||
describe('when connectors and actions privileges', () => { | ||
describe('are `READ`', () => { | ||
const assistantAvailability: AssistantAvailability = { | ||
hasAssistantPrivilege: true, | ||
hasConnectorsAllPrivilege: false, | ||
hasConnectorsReadPrivilege: true, | ||
isAssistantEnabled: true, | ||
}; | ||
|
||
it('should show connector privileges required button if no connectors exist', async () => { | ||
const { queryByTestId } = render( | ||
<TestProviders assistantAvailability={assistantAvailability}> | ||
<ConnectorMissingCallout | ||
isConnectorConfigured={false} | ||
isSettingsModalVisible={false} | ||
setIsSettingsModalVisible={jest.fn()} | ||
/> | ||
</TestProviders> | ||
); | ||
|
||
expect(queryByTestId('connectorButton')).toBeInTheDocument(); | ||
}); | ||
|
||
it('should NOT show connector privileges required button if at least one connector exists', async () => { | ||
const { queryByTestId } = render( | ||
<TestProviders assistantAvailability={assistantAvailability}> | ||
<ConnectorMissingCallout | ||
isConnectorConfigured={true} | ||
isSettingsModalVisible={false} | ||
setIsSettingsModalVisible={jest.fn()} | ||
/> | ||
</TestProviders> | ||
); | ||
|
||
expect(queryByTestId('connectorButton')).not.toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
describe('are `NONE`', () => { | ||
const assistantAvailability: AssistantAvailability = { | ||
hasAssistantPrivilege: true, | ||
hasConnectorsAllPrivilege: false, | ||
hasConnectorsReadPrivilege: false, | ||
isAssistantEnabled: true, | ||
}; | ||
|
||
it('should show connector privileges required button', async () => { | ||
const { queryByTestId } = render( | ||
<TestProviders assistantAvailability={assistantAvailability}> | ||
<ConnectorMissingCallout | ||
isConnectorConfigured={true} | ||
isSettingsModalVisible={false} | ||
setIsSettingsModalVisible={jest.fn()} | ||
/> | ||
</TestProviders> | ||
); | ||
|
||
expect(queryByTestId('connectorButton')).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.