Add admin and customer interfaces, orders, signed activation and leases, protected package delivery, keyring verification, migrations, security controls, tests and deployment documentation. Co-Authored-By: Craft Agent <agents-noreply@craft.do>
14 lines
852 B
TypeScript
14 lines
852 B
TypeScript
import { mount } from '@vue/test-utils'
|
|
import { describe, expect, it } from 'vitest'
|
|
import ReleasesPanel from './ReleasesPanel.vue'
|
|
|
|
describe('ReleasesPanel', () => {
|
|
it('shows validation error without sending an invalid publication', async () => {
|
|
const wrapper = mount(ReleasesPanel, { props: { products: [] }, global: { stubs: { ElButton: { template: '<button @click="$emit(\'click\')"><slot /></button>' }, ElSelect: true, ElOption: true, ElInput: true, ElTable: true, ElTableColumn: true, ElPagination: true }, directives: { loading: () => {} } } })
|
|
expect(wrapper.find('[role="alert"]').exists()).toBe(false)
|
|
await wrapper.findAll('button')[1]!.trigger('click')
|
|
expect(wrapper.find('[role="alert"]').text()).toContain('请选择产品')
|
|
expect(wrapper.find('input[type="file"]').attributes('aria-label')).toBe('版本文件')
|
|
})
|
|
})
|