mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-18 21:02:50 +03:00
test(dashboard): reactivate webhook wizard coverage (#13844)
Co-authored-by: Paco Cartones <pacocartones@users.noreply.github.com>
This commit is contained in:
@@ -1056,11 +1056,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/webhooks/__tests__/webhook-wizard.test.tsx": {
|
||||
"@typescript-eslint/no-unused-vars": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/api/assess/route.ts": {
|
||||
"@typescript-eslint/no-unused-vars": {
|
||||
"count": 1
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
"measured": "2026-09-10",
|
||||
"status": "Tests 1 failed | 5 passed (6)"
|
||||
},
|
||||
{
|
||||
"file": "src/app/(dashboard)/dashboard/webhooks/__tests__/webhook-wizard.test.tsx",
|
||||
"issue": "#13204",
|
||||
"measured": "2026-09-10",
|
||||
"status": "Tests 1 failed | 6 passed (7)"
|
||||
},
|
||||
{
|
||||
"file": "tests/unit/ui/logs-page-detail-modal-reopen-on-close.test.tsx",
|
||||
"issue": "#13204",
|
||||
|
||||
@@ -67,13 +67,18 @@ function t(key: string): string {
|
||||
function getButton(text: string): HTMLButtonElement | null {
|
||||
return (
|
||||
(Array.from(document.querySelectorAll("button")).find((b) => b.textContent?.includes(text)) as
|
||||
| HTMLButtonElement
|
||||
| undefined) ?? null
|
||||
HTMLButtonElement | undefined) ?? null
|
||||
);
|
||||
}
|
||||
|
||||
const roots: Array<{ unmount: () => void }> = [];
|
||||
|
||||
beforeEach(() => {
|
||||
(
|
||||
globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean }
|
||||
).IS_REACT_ACT_ENVIRONMENT = true;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
roots.forEach((r) => {
|
||||
act(() => r.unmount());
|
||||
@@ -233,6 +238,11 @@ describe("AddWebhookWizard — step 2→3 creates webhook with correct kind", ()
|
||||
|
||||
renderIntoBody(<AddWebhookWizard isOpen={true} onClose={vi.fn()} onCreated={vi.fn()} t={t} />);
|
||||
|
||||
// Let the wizard's open/reset effect settle before interacting with step 1.
|
||||
await act(async () => {
|
||||
await Promise.resolve();
|
||||
});
|
||||
|
||||
// Step 1: default is "slack", click Next
|
||||
const nextBtn1 = getButton("Next");
|
||||
expect(nextBtn1).toBeTruthy();
|
||||
|
||||
@@ -39,7 +39,6 @@ export default defineConfig({
|
||||
"tests/e2e/protocol-clients.test.ts",
|
||||
// ── Pre-existing failures tracked by #8618 ───────────────────────────────
|
||||
"tests/unit/ui/request-logger-autorefresh-visibility-3972.test.tsx", // #13204 — falha real; remover esta exclusão quando consertado
|
||||
"src/app/(dashboard)/dashboard/webhooks/__tests__/webhook-wizard.test.tsx", // #13204 — falha real; remover esta exclusão quando consertado
|
||||
"tests/unit/ui/logs-page-detail-modal-reopen-on-close.test.tsx", // #13204 — falha real; remover esta exclusão quando consertado
|
||||
"tests/unit/ui/agent-card.test.tsx", // #13204 — falha real; remover esta exclusão quando consertado
|
||||
"src/app/(dashboard)/dashboard/endpoint/__tests__/ApiEndpointsTab.test.tsx", // #13204 — falha real; remover esta exclusão quando consertado
|
||||
|
||||
Reference in New Issue
Block a user