Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix skipped tests #102

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/packages/Breadcrumb/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { Fragment } from 'react'
import NavLink, { NavLinkProps } from '../NavLink'
import { SpacingKeys } from '../../styles/spacingModifier'
import * as S from './styles'
Expand Down Expand Up @@ -26,7 +26,7 @@ const Breadcrumb = ({
return (
<S.Breadcrumb>
{items.map((item, index) => (
<>
<Fragment key={index}>
{index > 0 && (
<S.BreadcrumbItem
key={`breadcrumb-${separator}-${index}`}
Expand All @@ -50,7 +50,7 @@ const Breadcrumb = ({
{item.name}
</NavLink>
</S.BreadcrumbItem>
</>
</Fragment>
))}
</S.Breadcrumb>
)
Expand Down
3 changes: 1 addition & 2 deletions src/packages/Breadcrumb/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const mock = [
link: '/blog/tech/react'
}
]
// TODO: Fix this test
describe.skip('<Breadcrumb>', () => {
describe('<Breadcrumb>', () => {
it('Should render the breadcrumb', () => {
const { container } = render(<Breadcrumb items={mock} />)
expect(container).toBeInTheDocument()
Expand Down
7 changes: 6 additions & 1 deletion src/packages/Paper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ const Paper = ({
...props
}: PaperProps) => {
return (
<S.Paper aria-hidden={!active} active={active} placement={placement}>
<S.Paper
aria-hidden={!active}
active={active}
placement={placement}
data-testid="paper"
>
<Box {...props} shadow border padding={padding}>
{children}
</Box>
Expand Down
13 changes: 6 additions & 7 deletions src/packages/Paper/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { theme } from '../../styles'

import Paper from '.'

// TODO: fix tests
describe.skip('<Paper />', () => {
describe('<Paper />', () => {
it('Should render when active is true', () => {
render(
<Paper active={true} placement="right" data-testid="paper">
<Paper active={true} placement="right">
<p>Hello world!</p>
</Paper>
)
Expand All @@ -17,7 +16,7 @@ describe.skip('<Paper />', () => {
})
it('Should not render when active is false', () => {
render(
<Paper active={false} placement="right" data-testid="paper">
<Paper active={false} placement="right">
<p>Hello world!</p>
</Paper>
)
Expand All @@ -35,7 +34,7 @@ describe.skip('<Paper />', () => {
})
it('Should render in bottom placement', () => {
render(
<Paper placement="bottom" data-testid="paper">
<Paper placement="bottom">
<></>
</Paper>
)
Expand All @@ -47,7 +46,7 @@ describe.skip('<Paper />', () => {
})
it('Should render in left placement', () => {
render(
<Paper placement="left" data-testid="paper">
<Paper placement="left">
<></>
</Paper>
)
Expand All @@ -59,7 +58,7 @@ describe.skip('<Paper />', () => {
})
it('Should render in right placement', () => {
render(
<Paper placement="right" data-testid="paper">
<Paper placement="right">
<></>
</Paper>
)
Expand Down