Skip to content

Commit

Permalink
test: fix skipped tests (#102)
Browse files Browse the repository at this point in the history
* fix: resolve breadcrumb tests

* fix: resolve paper tests
  • Loading branch information
printf-ana authored Oct 4, 2023
1 parent 5d709ba commit b314dc1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
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

0 comments on commit b314dc1

Please sign in to comment.