test: update certificate deletion tests to use string UUIDs instead of integers

This commit is contained in:
GitHub Actions
2026-04-13 12:04:47 +00:00
parent 48f6b7a12b
commit 0ae1dc998a
4 changed files with 926 additions and 4 deletions
@@ -129,7 +129,7 @@ describe('ProxyHosts - Certificate Cleanup Prompts', () => {
await waitFor(() => {
expect(proxyHostsApi.deleteProxyHost).toHaveBeenCalledWith('h1')
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith(1)
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith('cert-1')
})
})
@@ -303,7 +303,7 @@ describe('ProxyHosts - Certificate Cleanup Prompts', () => {
await waitFor(() => {
expect(proxyHostsApi.deleteProxyHost).toHaveBeenCalledWith('h1')
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith(1)
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith('cert-1')
})
// Toast should show error about certificate but host was deleted
@@ -366,7 +366,7 @@ describe('ProxyHosts - Certificate Cleanup Prompts', () => {
await waitFor(() => {
expect(proxyHostsApi.deleteProxyHost).toHaveBeenCalledWith('h1')
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith(1)
expect(certificatesApi.deleteCertificate).toHaveBeenCalledWith('cert-1')
})
expect(proxyHostsApi.deleteProxyHost).toHaveBeenCalledWith('h2')
})
@@ -72,7 +72,7 @@ describe('ProxyHosts page - coverage targets (isolated)', () => {
vi.doMock('../../hooks/useCertificates', () => ({
useCertificates: vi.fn(() => ({
certificates: [
{ id: 1, name: 'StagingCert', domain: 'staging.example.com', status: 'untrusted', provider: 'letsencrypt-staging' }
{ id: 1, name: 'StagingCert', domains: 'staging.example.com', status: 'untrusted', provider: 'letsencrypt-staging' }
],
isLoading: false,
error: null,