Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
return (
<>
<h1>Step: {stepsMap[currentStepIndex]}</h1>
<div data-testid='visible-steps'>
{contractorOnboardingBag.steps
.filter((step) => step.visible !== false)
.map((step) => step.name)
.join(' ')}
</div>
<FormComponent
contractorOnboardingBag={contractorOnboardingBag}
components={components}
Expand Down Expand Up @@ -1270,8 +1276,14 @@

await screen.findByText(/Step: Pricing Plan/i);
await waitForElementToBeRemoved(() => screen.getByTestId('spinner'));

Check failure on line 1279 in src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx

View workflow job for this annotation

GitHub Actions / Generate Base Coverage

src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx > ContractorOnboardingFlow > should override contract_origin field title using jsfModify options

TestingLibraryElementError: Unable to find an element with the text: /Step: Contract Origin/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body style="" > <div> <h1> Step: Contract Details </h1> <div data-can-skip-ai-validation="false" data-testid="contract-details-container" > <div class="space-y-4" > <form class="space-y-4 RemoteFlows__OnboardingForm" id=":rba:" > <input name="services_and_deliverables_ai_warning" type="hidden" value="" /> <input name="services_and_deliverables_error_skippable" type="hidden" value="" /> <div class="grid gap-2 RemoteFlows__TextArea__Item__services_and_deliverables" data-field="services_and_deliverables" data-slot="form-item" > <label class="flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 text-base-color mb-1 data-[error=true]:text-destructive RemoteFlows__TextArea__Label" data-error="false" data-slot="form-label" for=":rc5:-form-item" > Services and Deliverables </label> <textarea aria-describedby=":rc5:-form-item-description" aria-invalid="false" class="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm RemoteFlows__TextArea__Input" data-slot="form-control" id=":rc5:-form-item" name="services_and_deliverables" placeholder="Services and Deliverables" /> <div class="flex items-center justify-between" > <p class="text-base-color text-xs RemoteFlows__TextArea__Description" data-children-type="string" data-sanitized="true" data-slot="form-description" id=":rc5:-form-item-description" > <span> List of projects, project descriptions and deliverables that a Contractor shall provide </span> </p> <span class="text-sm ml-auto RemoteFlows__TextArea__MaxLength" > 0 / 3000 </span> </div> </div> <fieldset class="border-1 border-input p-4 rounded-xl RemoteFlows__FieldSetField RemoteFlows__FieldSetField__service_duration" > <legend class="text-sm font-semibold px-2" > Service duration </legend> <div aria-labelledby="service_duration-header" id="service_duration-content" role="region" > <div class="grid gap-4" > <div class="input-container" > <label for="service_duration.provisional_start_date" > Service start date </label> <input aria-invalid="false" data-testid="service_duration.provisional_start_date" id="service_duration.provisional_start_date" min="2026-07-08" type="date" value="2025-
await fillContractorSubscription();
await fillContractorSubscription('Contractor Management');

await waitFor(() => {
expect(screen.getByTestId('visible-steps')).toHaveTextContent(
'contract_origin',
);
});

nextButton = screen.getByText(/Next Step/i);
nextButton.click();
Expand Down
Loading