+ {isOperator ? (
+
+
+
+ ) : null}
+
+
+ }
+ error={
+
+ }
+ label="SCEP challenges"
+ rowKey={(c) => c.id}
+ rows={challenges}
+ status={status}
+ />
+
+ {showMint ? (
+
setShowMint(false)}
+ onMinted={() => {
+ refresh();
+ }}
+ />
+ ) : null}
+ {revokeTarget ? (
+ setRevokeTarget(null)}
+ onDone={() => {
+ setRevokeTarget(null);
+ refresh();
+ }}
+ profile={revokeTarget.profile}
+ />
+ ) : null}
+
+ );
+};
diff --git a/apps/console/src/components/revoke-node-scep-challenge-dialog.test.tsx b/apps/console/src/components/revoke-node-scep-challenge-dialog.test.tsx
new file mode 100644
index 0000000..7a962a1
--- /dev/null
+++ b/apps/console/src/components/revoke-node-scep-challenge-dialog.test.tsx
@@ -0,0 +1,77 @@
+/*
+Copyright The CryptOS Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import { fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+import { RevokeNodeScepChallengeDialog } from "@/components/revoke-node-scep-challenge-dialog";
+import { expectNoA11yViolations } from "@/test/axe";
+
+const revokeNodeScepChallenge = vi.fn();
+vi.mock("@/lib/node-scep-challenges", () => ({
+ revokeNodeScepChallenge: (...a: unknown[]) => revokeNodeScepChallenge(...a),
+}));
+
+const revokeButton = () => screen.getByRole("button", { name: /^revoke$/i });
+
+const renderDialog = () =>
+ render(
+