-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Sinisa Andric <[email protected]> Signed-off-by: Sinisa Andric <[email protected]> (cherry picked from commit 9136293) Co-authored-by: Sinisa Andric <[email protected]>
- Loading branch information
1 parent
3c7aff9
commit e1db119
Showing
6 changed files
with
452 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import DeleteModal from './DeleteModal'; | ||
|
||
describe('<DeleteModal /> spec', () => { | ||
it('renders the component', () => { | ||
const tree = render( | ||
<DeleteModal | ||
closeDeleteModal={() => jest.fn()} | ||
ids={'some ids'} | ||
onClickDelete={() => jest.fn()} | ||
type={'some type'} | ||
/> | ||
); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
184 changes: 184 additions & 0 deletions
184
public/components/DeleteModal/__snapshots__/DeleteModal.test.tsx.snap
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,184 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<DeleteModal /> spec renders the component 1`] = ` | ||
Object { | ||
"asFragment": [Function], | ||
"baseElement": <body | ||
class="euiBody-hasOverlayMask" | ||
> | ||
<div | ||
aria-hidden="true" | ||
data-aria-hidden="true" | ||
/> | ||
<div | ||
aria-hidden="true" | ||
class="euiOverlayMask euiOverlayMask--aboveHeader" | ||
data-aria-hidden="true" | ||
/> | ||
<div | ||
class="euiOverlayMask euiOverlayMask--aboveHeader" | ||
> | ||
<div | ||
aria-hidden="true" | ||
data-aria-hidden="true" | ||
data-focus-guard="true" | ||
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" | ||
tabindex="0" | ||
/> | ||
<div | ||
data-focus-lock-disabled="false" | ||
> | ||
<div | ||
class="euiModal euiModal--maxWidth-default euiModal--confirmation" | ||
tabindex="0" | ||
> | ||
<button | ||
aria-label="Closes this modal window" | ||
class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiModal__closeIcon" | ||
type="button" | ||
> | ||
EuiIconMock | ||
</button> | ||
<div | ||
class="euiModal__flex" | ||
> | ||
<div | ||
class="euiModalHeader" | ||
> | ||
<div | ||
class="euiModalHeader__title" | ||
data-test-subj="confirmModalTitleText" | ||
> | ||
Delete some type | ||
</div> | ||
</div> | ||
<div | ||
class="euiModalBody" | ||
> | ||
<div | ||
class="euiModalBody__overflow" | ||
> | ||
<div | ||
class="euiText euiText--medium" | ||
data-test-subj="confirmModalBodyText" | ||
> | ||
<div | ||
class="euiForm" | ||
> | ||
<p> | ||
Delete " | ||
<strong> | ||
some ids | ||
</strong> | ||
" permanently? | ||
</p> | ||
<div | ||
class="euiSpacer euiSpacer--s" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
class="euiModalFooter" | ||
> | ||
<button | ||
class="euiButtonEmpty euiButtonEmpty--primary" | ||
data-test-subj="confirmModalCancelButton" | ||
type="button" | ||
> | ||
<span | ||
class="euiButtonContent euiButtonEmpty__content" | ||
> | ||
<span | ||
class="euiButtonEmpty__text" | ||
> | ||
Cancel | ||
</span> | ||
</span> | ||
</button> | ||
<button | ||
class="euiButton euiButton--danger euiButton--fill" | ||
data-test-subj="confirmModalConfirmButton" | ||
type="button" | ||
> | ||
<span | ||
class="euiButtonContent euiButton__content" | ||
> | ||
<span | ||
class="euiButton__text" | ||
> | ||
Delete some type | ||
</span> | ||
</span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
aria-hidden="true" | ||
data-aria-hidden="true" | ||
data-focus-guard="true" | ||
style="width: 1px; height: 0px; padding: 0px; overflow: hidden; position: fixed; top: 1px; left: 1px;" | ||
tabindex="0" | ||
/> | ||
</div> | ||
</body>, | ||
"container": <div | ||
aria-hidden="true" | ||
data-aria-hidden="true" | ||
/>, | ||
"debug": [Function], | ||
"findAllByAltText": [Function], | ||
"findAllByDisplayValue": [Function], | ||
"findAllByLabelText": [Function], | ||
"findAllByPlaceholderText": [Function], | ||
"findAllByRole": [Function], | ||
"findAllByTestId": [Function], | ||
"findAllByText": [Function], | ||
"findAllByTitle": [Function], | ||
"findByAltText": [Function], | ||
"findByDisplayValue": [Function], | ||
"findByLabelText": [Function], | ||
"findByPlaceholderText": [Function], | ||
"findByRole": [Function], | ||
"findByTestId": [Function], | ||
"findByText": [Function], | ||
"findByTitle": [Function], | ||
"getAllByAltText": [Function], | ||
"getAllByDisplayValue": [Function], | ||
"getAllByLabelText": [Function], | ||
"getAllByPlaceholderText": [Function], | ||
"getAllByRole": [Function], | ||
"getAllByTestId": [Function], | ||
"getAllByText": [Function], | ||
"getAllByTitle": [Function], | ||
"getByAltText": [Function], | ||
"getByDisplayValue": [Function], | ||
"getByLabelText": [Function], | ||
"getByPlaceholderText": [Function], | ||
"getByRole": [Function], | ||
"getByTestId": [Function], | ||
"getByText": [Function], | ||
"getByTitle": [Function], | ||
"queryAllByAltText": [Function], | ||
"queryAllByDisplayValue": [Function], | ||
"queryAllByLabelText": [Function], | ||
"queryAllByPlaceholderText": [Function], | ||
"queryAllByRole": [Function], | ||
"queryAllByTestId": [Function], | ||
"queryAllByText": [Function], | ||
"queryAllByTitle": [Function], | ||
"queryByAltText": [Function], | ||
"queryByDisplayValue": [Function], | ||
"queryByLabelText": [Function], | ||
"queryByPlaceholderText": [Function], | ||
"queryByRole": [Function], | ||
"queryByTestId": [Function], | ||
"queryByText": [Function], | ||
"queryByTitle": [Function], | ||
"rerender": [Function], | ||
"unmount": [Function], | ||
} | ||
`; |
15 changes: 15 additions & 0 deletions
15
public/components/FormFieldHeader/FormFieldHeader.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,15 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import { FormFieldHeader } from './FormFieldHeader'; | ||
|
||
describe('<FormFieldHeader /> spec', () => { | ||
it('renders the component', () => { | ||
const tree = render(<FormFieldHeader headerTitle={'some title'} />); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
78 changes: 78 additions & 0 deletions
78
public/components/FormFieldHeader/__snapshots__/FormFieldHeader.test.tsx.snap
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,78 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<FormFieldHeader /> spec renders the component 1`] = ` | ||
Object { | ||
"asFragment": [Function], | ||
"baseElement": <body> | ||
<div> | ||
<div | ||
class="euiText euiText--small" | ||
> | ||
<strong> | ||
some title | ||
</strong> | ||
</div> | ||
</div> | ||
</body>, | ||
"container": <div> | ||
<div | ||
class="euiText euiText--small" | ||
> | ||
<strong> | ||
some title | ||
</strong> | ||
</div> | ||
</div>, | ||
"debug": [Function], | ||
"findAllByAltText": [Function], | ||
"findAllByDisplayValue": [Function], | ||
"findAllByLabelText": [Function], | ||
"findAllByPlaceholderText": [Function], | ||
"findAllByRole": [Function], | ||
"findAllByTestId": [Function], | ||
"findAllByText": [Function], | ||
"findAllByTitle": [Function], | ||
"findByAltText": [Function], | ||
"findByDisplayValue": [Function], | ||
"findByLabelText": [Function], | ||
"findByPlaceholderText": [Function], | ||
"findByRole": [Function], | ||
"findByTestId": [Function], | ||
"findByText": [Function], | ||
"findByTitle": [Function], | ||
"getAllByAltText": [Function], | ||
"getAllByDisplayValue": [Function], | ||
"getAllByLabelText": [Function], | ||
"getAllByPlaceholderText": [Function], | ||
"getAllByRole": [Function], | ||
"getAllByTestId": [Function], | ||
"getAllByText": [Function], | ||
"getAllByTitle": [Function], | ||
"getByAltText": [Function], | ||
"getByDisplayValue": [Function], | ||
"getByLabelText": [Function], | ||
"getByPlaceholderText": [Function], | ||
"getByRole": [Function], | ||
"getByTestId": [Function], | ||
"getByText": [Function], | ||
"getByTitle": [Function], | ||
"queryAllByAltText": [Function], | ||
"queryAllByDisplayValue": [Function], | ||
"queryAllByLabelText": [Function], | ||
"queryAllByPlaceholderText": [Function], | ||
"queryAllByRole": [Function], | ||
"queryAllByTestId": [Function], | ||
"queryAllByText": [Function], | ||
"queryAllByTitle": [Function], | ||
"queryByAltText": [Function], | ||
"queryByDisplayValue": [Function], | ||
"queryByLabelText": [Function], | ||
"queryByPlaceholderText": [Function], | ||
"queryByRole": [Function], | ||
"queryByTestId": [Function], | ||
"queryByText": [Function], | ||
"queryByTitle": [Function], | ||
"rerender": [Function], | ||
"unmount": [Function], | ||
} | ||
`; |
15 changes: 15 additions & 0 deletions
15
public/components/NotificationsCallOut/NotificationsCallOut.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,15 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import { NotificationsCallOut } from './NotificationsCallOut'; | ||
|
||
describe('<NotificationsCallOut /> spec', () => { | ||
it('renders the component', () => { | ||
const tree = render(<NotificationsCallOut />); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
Oops, something went wrong.