From 02667bbda4d74935d7bb365b4c27be12edf85711 Mon Sep 17 00:00:00 2001 From: taylanbakircioglu Date: Sun, 9 Aug 2026 03:17:15 +0300 Subject: [PATCH] test(acme): make the wizard regression suite pass under the default jest timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #57. The contributed tests render the whole ACMEAutomation tree (antd Steps + Form + Select) and drive it through all three wizard steps, which takes 4-9 seconds per test. Under jest's default 5s per-test limit two of them failed, so `npm test` did not pass as shipped: ✕ an explicitly picked HTTP-01 account survives the step change and is what gets submitted -> Exceeded timeout of 5000 ms ✕ the wildcard guard still applies on the Review step, where Submit lives -> Exceeded timeout of 5000 ms The PR's reported 5/5 holds only when the runner is invoked with an explicit --testTimeout. Setting it in the file instead means the suite passes however it is invoked, which matters because the frontend image build runs `npm run build` and never the tests, so nothing else would have caught this. Verified with the default runner (no flags) after the change: 5/5 pass. Test-only. No production code touched. --- .../src/components/__tests__/ACMEAutomation.wizard.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/__tests__/ACMEAutomation.wizard.test.js b/frontend/src/components/__tests__/ACMEAutomation.wizard.test.js index 1ce2e07..a29dea5 100644 --- a/frontend/src/components/__tests__/ACMEAutomation.wizard.test.js +++ b/frontend/src/components/__tests__/ACMEAutomation.wizard.test.js @@ -13,6 +13,11 @@ import { render, screen, fireEvent, waitFor, act } from '@testing-library/react' import axios from 'axios'; import ACMEAutomation from '../ACMEAutomation'; +// These render the whole ACMEAutomation tree (antd Steps + Form + Select) three times per test and +// take 4-7s each, so jest's default 5s per-test limit fails two of them. Raise it here rather than +// relying on the runner being invoked with --testTimeout, so `npm test` passes as shipped. +jest.setTimeout(30000); + jest.mock('axios'); jest.mock('react-router-dom', () => ({ useNavigate: () => jest.fn() })); jest.mock('../../contexts/ClusterContext', () => ({