-
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.
Expandable flyout translations (#166216)
- Loading branch information
1 parent
c7d2eb5
commit 8d14f21
Showing
112 changed files
with
1,532 additions
and
1,637 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
x-pack/plugins/security_solution/public/flyout/isolate_host/header.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,42 @@ | ||
/* | ||
* 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 { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; | ||
import { useIsolateHostPanelContext } from './context'; | ||
import { PanelHeader } from './header'; | ||
import { FLYOUT_HEADER_TITLE_TEST_ID } from './test_ids'; | ||
|
||
jest.mock('./context'); | ||
|
||
const renderPanelHeader = () => | ||
render( | ||
<IntlProvider locale="en"> | ||
<PanelHeader /> | ||
</IntlProvider> | ||
); | ||
|
||
describe('<PanelHeader />', () => { | ||
(useIsolateHostPanelContext as jest.Mock).mockReturnValue({ isolateAction: 'isolateHost' }); | ||
|
||
it('should display isolate host message', () => { | ||
const { getByTestId } = renderPanelHeader(); | ||
|
||
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toBeInTheDocument(); | ||
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toHaveTextContent('Isolate host'); | ||
}); | ||
|
||
it('should display release host message', () => { | ||
(useIsolateHostPanelContext as jest.Mock).mockReturnValue({ isolateAction: 'unisolateHost' }); | ||
|
||
const { getByTestId } = renderPanelHeader(); | ||
|
||
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toBeInTheDocument(); | ||
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toHaveTextContent('Release host'); | ||
}); | ||
}); |
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
22 changes: 0 additions & 22 deletions
22
x-pack/plugins/security_solution/public/flyout/isolate_host/translations.ts
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.