This commit is contained in:
2026-08-05 15:54:59 +08:00
parent eede351038
commit 4b31eb7786
43 changed files with 2117 additions and 851 deletions
@@ -53,6 +53,7 @@ describe('CustomerDetailView', () => {
beforeEach(() => {
vi.clearAllMocks()
vi.stubGlobal('ResizeObserver', ResizeObserverStub)
Object.defineProperty(HTMLElement.prototype, 'scrollIntoView', { configurable: true, value: vi.fn() })
Object.defineProperty(URL, 'createObjectURL', { configurable: true, value: vi.fn(() => 'blob:qualification-preview') })
Object.defineProperty(URL, 'revokeObjectURL', { configurable: true, value: vi.fn() })
document.body.innerHTML = ''
@@ -82,6 +83,13 @@ describe('CustomerDetailView', () => {
expect(document.body.textContent).not.toContain('0 人正常使用')
expect(document.body.textContent).toContain('已替换')
expect(document.body.textContent).toContain('12票')
const billingTab = [...document.querySelectorAll<HTMLButtonElement>('.detail-tabs button')]
.find((button) => button.textContent?.trim() === '计费规则')
billingTab?.click()
await flushPromises()
expect(document.body.textContent).toContain('暂无计费规则查看权限')
expect(document.body.textContent).not.toContain('计费规则尚未接入')
})
it('opens an authenticated qualification preview', async () => {