Skip to content

Commit 9bad582

Browse files
committed
test(app-bar): improve test coverage
1 parent c8396dd commit 9bad582

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

packages/varlet-ui/src/app-bar/__tests__/index.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,23 @@ describe('test app bar component props', () => {
167167
wrapper.unmount()
168168
})
169169

170+
test('app bar image without image-linear-gradient', () => {
171+
const wrapper = mount(VarAppBar, {
172+
props: {
173+
image: 'https://1.png',
174+
},
175+
})
176+
177+
expect(wrapper.vm.rootStyles).toMatchObject({
178+
'background-image': 'url(https://1.png)',
179+
'background-position': 'center center',
180+
'background-size': 'cover',
181+
'z-index': 1,
182+
})
183+
184+
wrapper.unmount()
185+
})
186+
170187
test('app bar fixed', async () => {
171188
const wrapper = mount(VarAppBar)
172189

0 commit comments

Comments
 (0)