Add server template apply modes, bulk revocation, explicit DN order and detail tabs

This commit is contained in:
2026-10-23 05:33:43 +00:00
parent 5eb7866f5b
commit 763268bd40
13 changed files with 1477 additions and 633 deletions
+23
View File
@@ -49,6 +49,9 @@ test("advanced extensions, validation and vault export", async ({ page }) => {
await page.getByRole("button", { name: "Create certificate" }).click();
await expect(page.getByRole("heading", { name: certName })).toBeVisible();
const certUrl = page.url();
const certApiUrl = certUrl.replace(/\/vaults\//, "/api/vaults/");
await page.locator(".nav-tabs").getByRole("button", { name: "Extensions", exact: true }).click();
await expect(page.getByText("CRL Distribution Points", { exact: false })).toBeVisible();
await expect(page.getByText("1.2.3.4", { exact: false })).toBeVisible();
@@ -59,4 +62,24 @@ test("advanced extensions, validation and vault export", async ({ page }) => {
await page.getByRole("button", { name: "Export ZIP" }).click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toMatch(/\.zip$/);
// Import preview selection: a duplicate is deselected by default, but can
// be selected explicitly and then reported as skipped by the commit.
await page.goto(`${vaultUrl}/import`);
await expect(page.getByRole("heading", { name: "Import" })).toBeVisible();
const pem = await page.evaluate(async (url) => {
const response = await fetch(`${url}/export`, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ format: "pem" }),
});
const payload = await response.json();
return atob(payload.content_base64);
}, certApiUrl);
await page.locator("textarea[placeholder='-----BEGIN CERTIFICATE-----']").fill(pem);
await page.getByRole("button", { name: "Preview", exact: true }).click();
await expect(page.getByText("duplicate", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "All", exact: true }).click();
await page.getByRole("button", { name: "Import", exact: true }).click();
await expect(page.getByText(/skipped 1/)).toBeVisible();
});