mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* feat(components): watermark component be able to set text,multi-text,image as watermark * docs(components): update image watermark example update the image for dark mode
23 lines
567 B
TypeScript
23 lines
567 B
TypeScript
import { mount } from '@vue/test-utils'
|
|
import { describe, expect, it } from 'vitest'
|
|
import Watermark from '../src/watermark.vue'
|
|
|
|
const AXIOM = 'Rem is the best girl'
|
|
|
|
describe('Watermark.vue', () => {
|
|
it('create', () => {
|
|
const wrapper = mount(() => (
|
|
<Watermark class="watermark">{AXIOM}</Watermark>
|
|
))
|
|
|
|
expect(wrapper.classes()).toContain('watermark')
|
|
expect(wrapper.html()).toMatchSnapshot()
|
|
})
|
|
|
|
it('slots', () => {
|
|
const wrapper = mount(() => <Watermark>{AXIOM}</Watermark>)
|
|
|
|
expect(wrapper.text()).toContain(AXIOM)
|
|
})
|
|
})
|