mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
feat(test): add ScreenEmptyState component tests
This commit is contained in:
parent
3196d138c1
commit
69ce0f5f9d
3 changed files with 26 additions and 1 deletions
|
@ -1,8 +1,8 @@
|
|||
import isMobile from 'ismobilejs'
|
||||
import { expect, it } from 'vitest'
|
||||
import { fireEvent } from '@testing-library/vue'
|
||||
import ComponentTestCase from '@/__tests__/ComponentTestCase'
|
||||
import ScreenControlsToggler from './ScreenControlsToggler.vue'
|
||||
import { fireEvent } from '@testing-library/vue'
|
||||
|
||||
new class extends ComponentTestCase {
|
||||
protected test () {
|
||||
|
|
16
resources/assets/js/components/ui/ScreenEmptyState.spec.ts
Normal file
16
resources/assets/js/components/ui/ScreenEmptyState.spec.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { expect, it } from 'vitest'
|
||||
import ComponentTestCase from '@/__tests__/ComponentTestCase'
|
||||
import ScreenEmptyState from './ScreenEmptyState.vue'
|
||||
|
||||
new class extends ComponentTestCase {
|
||||
protected test () {
|
||||
it('renders', () => {
|
||||
expect(this.render(ScreenEmptyState, {
|
||||
slots: {
|
||||
icon: '<i class="my-icon"/>',
|
||||
default: 'Nothing here'
|
||||
}
|
||||
}).html()).toMatchSnapshot()
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// Vitest Snapshot v1
|
||||
|
||||
exports[`renders 1`] = `
|
||||
"<div class=\\"screen-empty-state\\" data-testid=\\"screen-empty-state\\">
|
||||
<div><span class=\\"jumbo-icon\\"><i class=\\"my-icon\\"></i></span>
|
||||
<div class=\\"text\\">Nothing here</div>
|
||||
</div>
|
||||
</div>"
|
||||
`;
|
Loading…
Reference in a new issue