-
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.
- Loading branch information
1 parent
08d08ef
commit f3f4764
Showing
22 changed files
with
725 additions
and
2 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/components/Atomic/FloatingPanel/FloatingPanel.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,10 @@ | ||
import { render } from '@testing-library/react' | ||
import FloatingPanel from './FloatingPanel' | ||
|
||
describe('<FloatingPanel>', () => { | ||
it('renders without crashing', () => { | ||
const { container, asFragment } = render(<FloatingPanel reference={<div>Reference</div>}>Test</FloatingPanel>) | ||
expect(container).toBeInTheDocument() | ||
expect(asFragment()).toMatchSnapshot() | ||
}) | ||
}) |
30 changes: 30 additions & 0 deletions
30
src/components/Atomic/FloatingPanel/__snapshots__/FloatingPanel.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,30 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<FloatingPanel> renders without crashing 1`] = ` | ||
<DocumentFragment> | ||
.emotion-0 { | ||
display: -webkit-box; | ||
display: -webkit-flex; | ||
display: -ms-flexbox; | ||
display: flex; | ||
-webkit-align-items: center; | ||
-webkit-box-align: center; | ||
-ms-flex-align: center; | ||
align-items: center; | ||
-webkit-transition: all 0.3s; | ||
transition: all 0.3s; | ||
cursor: pointer; | ||
} | ||
<div> | ||
<span | ||
class="emotion-0" | ||
data-block-outside-click="true" | ||
> | ||
<div> | ||
Reference | ||
</div> | ||
</span> | ||
</div> | ||
</DocumentFragment> | ||
`; |
20 changes: 20 additions & 0 deletions
20
src/components/Atomic/FullPageLoader/FullPageLoader.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,20 @@ | ||
import { render } from '@testing-library/react' | ||
import FullPageLoader from './FullPageLoader' | ||
|
||
describe('<FullPageLoader>', () => { | ||
it('renders without crashing', () => { | ||
const { container } = render(<FullPageLoader i18n={{ loading: 'Loading' }} />) | ||
expect(container).toBeInTheDocument() | ||
}) | ||
|
||
it('displays loading text', () => { | ||
const { getByText } = render(<FullPageLoader i18n={{ loading: 'Loading' }} />) | ||
expect(getByText('Loading...')).toBeInTheDocument() | ||
}) | ||
|
||
it('applies auth-loader class to PageLoader', () => { | ||
const { container } = render(<FullPageLoader i18n={{ loading: 'Loading' }} />) | ||
const pageLoader = container.querySelector('.auth-loader') | ||
expect(pageLoader).not.toBeNull() | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { render, waitFor } from '@testing-library/react' | ||
import Icon, { IconsRaw } from '../Icon' | ||
|
||
describe('<Icon>', () => { | ||
it('render correctly - snapshot', async () => { | ||
const { asFragment } = render( | ||
<div> | ||
{IconsRaw.map((icon, index) => ( | ||
<Icon icon={icon} key={index} /> | ||
))} | ||
</div> | ||
) | ||
|
||
await waitFor(() => { | ||
expect(asFragment()).toMatchSnapshot() | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.