fix: 修复 OSS 删除与历史筛选

This commit is contained in:
shenlei
2026-07-20 17:09:28 +09:00
parent 44405e589d
commit 13366ab3b4
6 changed files with 88 additions and 22 deletions
+7 -5
View File
@@ -78,7 +78,7 @@ describe('HistoryView.vue', () => {
expect(wrapper.text()).toContain('等待中')
})
it('按打包类型过滤', async () => {
it('版本号筛选为下拉选项', async () => {
const router = createMockRouter()
const wrapper = mount(HistoryView, {
global: { plugins: [router] },
@@ -86,7 +86,9 @@ describe('HistoryView.vue', () => {
await flushPromises()
const selects = wrapper.findAll('.filter-select')
await selects[2].setValue('Ad_Hoc')
expect(selects).toHaveLength(3)
expect(wrapper.text()).not.toContain('全部类型')
await selects[1].setValue('2.196.0')
await wrapper.vm.$nextTick()
const rows = wrapper.findAll('tbody tr')
@@ -101,14 +103,14 @@ describe('HistoryView.vue', () => {
await flushPromises()
const selects = wrapper.findAll('.filter-select')
await selects[3].setValue('failed')
await selects[2].setValue('failed')
await wrapper.vm.$nextTick()
const rows = wrapper.findAll('tbody tr')
expect(rows.length).toBe(1) // App2
})
it('按 App 名称和版本号筛选', async () => {
it('按 App 名称和版本号下拉选项筛选', async () => {
const router = createMockRouter()
const wrapper = mount(HistoryView, {
global: { plugins: [router] },
@@ -117,7 +119,7 @@ describe('HistoryView.vue', () => {
const selects = wrapper.findAll('.filter-select')
await selects[0].setValue('App1')
await wrapper.find('.version-filter').setValue('2.196')
await wrapper.find('.version-filter').setValue('2.196.0')
await wrapper.vm.$nextTick()
const rows = wrapper.findAll('tbody tr')