Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud committed Aug 9, 2023
1 parent f415371 commit 3df9b58
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/packages/overlay/__tests__/overlay.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ import { Overlay } from '../overlay'

test('should change z-index when using z-index prop', () => {
const { getByTestId } = render(
<Overlay data-testid="overlay-zindex" visible zIndex={99} />
<Overlay
data-testid="overlay-zindex"
visible
style={{ '--nutui-overlay-zIndex': 99 }}
/>
)
expect(getByTestId('overlay-zindex').style.zIndex).toBe('99')
// @ts-ignore
expect(getByTestId('overlay-zindex')).toMatchInlineSnapshot(`
<div
class="nut-overlay"
data-testid="overlay-zindex"
style="--nutui-overlay-zIndex: 99;"
/>
`)
})

test('prop close-on-click-overlay test', () => {
Expand Down

0 comments on commit 3df9b58

Please sign in to comment.