mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 03:31:24 +08:00
test(scrollbar): fix snapshot mismatched
This commit is contained in:
parent
01b1d7bc47
commit
c723af67c0
@ -160,21 +160,6 @@ describe('Scrollbar', () => {
|
||||
})
|
||||
|
||||
describe('props handling', () => {
|
||||
it('should handle right prop correctly', () => {
|
||||
const { container } = render(
|
||||
<Scrollbar data-testid="scrollbar" right>
|
||||
内容
|
||||
</Scrollbar>
|
||||
)
|
||||
|
||||
const scrollbar = screen.getByTestId('scrollbar')
|
||||
|
||||
// 验证 right 属性被正确传递
|
||||
expect(scrollbar).toBeDefined()
|
||||
// snapshot 测试 styled-components 样式
|
||||
expect(container.firstChild).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('should handle ref forwarding', () => {
|
||||
const ref = { current: null }
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ exports[`Scrollbar > rendering > should match default styled snapshot 1`] = `
|
||||
}
|
||||
|
||||
.c0::-webkit-scrollbar-thumb:hover {
|
||||
background: transparent;
|
||||
background: var(--color-scrollbar-thumb-hover);
|
||||
}
|
||||
|
||||
<div
|
||||
|
||||
Loading…
Reference in New Issue
Block a user