-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5db25e1
commit 49830b1
Showing
24 changed files
with
2,287 additions
and
899 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
15 changes: 15 additions & 0 deletions
15
web/src/components/CreateTestModal/__test__/CreateTestModal.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 @@ | ||
import {render} from '@testing-library/react'; | ||
import {MemoryRouter} from 'react-router-dom'; | ||
import CreateTestModal from '../CreateTestModal'; | ||
import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; | ||
|
||
test('CreateTestModal', () => { | ||
const result = render( | ||
<MemoryRouter> | ||
<ReduxWrapperProvider> | ||
<CreateTestModal visible onClose={jest.fn()} /> | ||
</ReduxWrapperProvider> | ||
</MemoryRouter> | ||
); | ||
expect(result.container).toMatchSnapshot(); | ||
}); |
9 changes: 9 additions & 0 deletions
9
web/src/components/CreateTestModal/__test__/__snapshots__/CreateTestModal.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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CreateTestModal 1`] = ` | ||
<div> | ||
<div | ||
class="sc-bdvvtL gmMIqV" | ||
/> | ||
</div> | ||
`; |
7 changes: 7 additions & 0 deletions
7
web/src/components/ErrorBoundary/__test__/ErrorBoundary.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,7 @@ | ||
import {render} from '@testing-library/react'; | ||
import ErrorBoundary from '../ErrorBoundary'; | ||
|
||
test('ErrorBoundary', () => { | ||
const result = render(<ErrorBoundary error={{message: '', stack: '', name: 'sdfk'}} />); | ||
expect(result.container).toMatchSnapshot(); | ||
}); |
40 changes: 40 additions & 0 deletions
40
web/src/components/ErrorBoundary/__test__/__snapshots__/ErrorBoundary.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,40 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ErrorBoundary 1`] = ` | ||
<div> | ||
<div | ||
class="sc-bdvvtL mLXGX" | ||
> | ||
<span | ||
aria-label="close-circle" | ||
class="anticon anticon-close-circle" | ||
role="img" | ||
style="color: red; font-size: 32px;" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
data-icon="close-circle" | ||
fill="currentColor" | ||
focusable="false" | ||
height="1em" | ||
viewBox="64 64 896 896" | ||
width="1em" | ||
> | ||
<path | ||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" | ||
/> | ||
</svg> | ||
</span> | ||
<h2 | ||
class="ant-typography" | ||
> | ||
Something went wrong! | ||
</h2> | ||
<div | ||
style="display: flex; max-width: 800px; padding: 24px;" | ||
> | ||
[object Object] | ||
</div> | ||
</div> | ||
</div> | ||
`; |
15 changes: 15 additions & 0 deletions
15
web/src/components/FailedTrace/__tests__/FailedTrace.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 @@ | ||
import {render} from '@testing-library/react'; | ||
import {MemoryRouter} from 'react-router-dom'; | ||
import FailedTrace from '../index'; | ||
import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; | ||
|
||
test('FailedTrace', () => { | ||
const result = render( | ||
<MemoryRouter> | ||
<ReduxWrapperProvider> | ||
<FailedTrace onRunTest={jest.fn()} testId="234" isDisplayingError onEdit={jest.fn()} /> | ||
</ReduxWrapperProvider> | ||
</MemoryRouter> | ||
); | ||
expect(result.container).toMatchSnapshot(); | ||
}); |
91 changes: 91 additions & 0 deletions
91
web/src/components/FailedTrace/__tests__/__snapshots__/FailedTrace.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,91 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`FailedTrace 1`] = ` | ||
<div> | ||
<div | ||
class="sc-bdvvtL mLXGX" | ||
> | ||
<div | ||
class="sc-gsDKAQ hUQIyF" | ||
> | ||
<span | ||
aria-label="close-circle" | ||
class="anticon anticon-close-circle sc-dkPtRN ikUQFp" | ||
role="img" | ||
style="color: rgb(232, 71, 73); font-size: 32px;" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
data-icon="close-circle" | ||
fill="currentColor" | ||
focusable="false" | ||
height="1em" | ||
viewBox="64 64 896 896" | ||
width="1em" | ||
> | ||
<path | ||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" | ||
/> | ||
</svg> | ||
</span> | ||
<div | ||
class="sc-gsDKAQ sc-hKwDye hUQIyF ctlTiW" | ||
> | ||
<h3 | ||
class="ant-typography" | ||
> | ||
Test Run Failed | ||
</h3> | ||
<span | ||
class="ant-typography ant-typography-secondary" | ||
> | ||
Information explaining the state the test failed at. | ||
</span> | ||
<span | ||
class="ant-typography ant-typography-secondary" | ||
> | ||
Please let us know about this issue - | ||
<a | ||
href="https://github.com/kubeshop/tracetest/issues/new/choose" | ||
> | ||
create an issue | ||
</a> | ||
or contact us via | ||
<a | ||
href="https://discord.gg/6zupCZFQbe" | ||
> | ||
Discord | ||
</a> | ||
. | ||
</span> | ||
<span | ||
class="ant-typography ant-typography-secondary" | ||
> | ||
We will check it out and respond to you. | ||
</span> | ||
</div> | ||
<div | ||
class="sc-eCImPb hBTGvO" | ||
> | ||
<button | ||
class="ant-btn ant-btn-primary ant-btn-background-ghost" | ||
type="button" | ||
> | ||
<span> | ||
Edit Test | ||
</span> | ||
</button> | ||
<button | ||
class="ant-btn ant-btn-primary ant-btn-background-ghost" | ||
type="button" | ||
> | ||
<span> | ||
Rerun Test | ||
</span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
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,12 @@ | ||
import {render} from '@testing-library/react'; | ||
import {MemoryRouter} from 'react-router-dom'; | ||
import Header from '../index'; | ||
|
||
test('Header', () => { | ||
const result = render( | ||
<MemoryRouter> | ||
<Header /> | ||
</MemoryRouter> | ||
); | ||
expect(result.container).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.