From b54ebb88f923221a44bbe26e161f1d4c7ab7e4d4 Mon Sep 17 00:00:00 2001 From: Jordi Vidaller Date: Wed, 8 Jul 2026 17:17:38 +0200 Subject: [PATCH 1/4] fix: select standard plan so contract_origin step is visible in jsfModify test The contract_origin step only renders when the selected pricing plan is the standard product ('Contractor Management'). The test defaulted to 'Contractor Management Plus', hiding the step and causing a timeout after merging PRs #1147 and #1148. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../ContractorOnboarding/tests/ContractorOnboarding.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx index 477dd550d..61d24f24e 100644 --- a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx +++ b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx @@ -1271,7 +1271,7 @@ describe('ContractorOnboardingFlow', () => { await screen.findByText(/Step: Pricing Plan/i); await waitForElementToBeRemoved(() => screen.getByTestId('spinner')); - await fillContractorSubscription(); + await fillContractorSubscription('Contractor Management'); nextButton = screen.getByText(/Next Step/i); nextButton.click(); From 77ad2516484c092da65ed9529df3a564ef878092 Mon Sep 17 00:00:00 2001 From: Jordi Vidaller Date: Wed, 8 Jul 2026 17:40:15 +0200 Subject: [PATCH 2/4] fix: wait for pricing plan selection to settle before navigating The includeContractOrigin effect reacts to the selected plan asynchronously; on slow CI the Next click fired before it settled, skipping the contract_origin step. Wait for the standard-plan radio to be checked before navigating. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tests/ContractorOnboarding.test.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx index 61d24f24e..bb3403efb 100644 --- a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx +++ b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx @@ -1273,6 +1273,12 @@ describe('ContractorOnboardingFlow', () => { await fillContractorSubscription('Contractor Management'); + await waitFor(() => { + expect( + screen.getByRole('radio', { name: /^Contractor Management$/i }), + ).toBeChecked(); + }); + nextButton = screen.getByText(/Next Step/i); nextButton.click(); From 4419c28fde05486d2fb316550fdc2fabe4930f82 Mon Sep 17 00:00:00 2001 From: Jordi Vidaller Date: Wed, 8 Jul 2026 17:52:22 +0200 Subject: [PATCH 3/4] fix: wait for contract_origin step to be reconciled before navigating The radio-checked wait resolved before the includeContractOrigin effect propagated to the steps array, so on slow CI the Next click still skipped the step. Expose visible steps from the bag in the test mock and wait until contract_origin is present, which is deterministic regardless of CI speed. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../tests/ContractorOnboarding.test.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx index bb3403efb..eaeef34d6 100644 --- a/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx +++ b/src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx @@ -82,6 +82,12 @@ function createMockRenderImplementation( return ( <>

Step: {stepsMap[currentStepIndex]}

+
+ {contractorOnboardingBag.steps + .filter((step) => step.visible !== false) + .map((step) => step.name) + .join(' ')} +
{ await fillContractorSubscription('Contractor Management'); await waitFor(() => { - expect( - screen.getByRole('radio', { name: /^Contractor Management$/i }), - ).toBeChecked(); + expect(screen.getByTestId('visible-steps')).toHaveTextContent( + 'contract_origin', + ); }); nextButton = screen.getByText(/Next Step/i); From 3e5709dd022133428a6dbcc33b6a4064c19725e8 Mon Sep 17 00:00:00 2001 From: Jordi Vidaller Date: Wed, 8 Jul 2026 18:09:41 +0200 Subject: [PATCH 4/4] chore: trigger CI rebuild on latest commit Co-Authored-By: Claude Opus 4.8 (1M context)