Skip to content

Commit 90a1ba6

Browse files
authored
fix(contractor-onboarding) - move to latest step when the employment.status is in a certain transitive state (#788)
1 parent 616a986 commit 90a1ba6

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/flows/ContractorOnboarding/tests/ContractorOnboarding.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ describe('ContractorOnboardingFlow', () => {
765765
});
766766
});
767767

768-
it.each(['invited'])(
768+
it.each(['invited', 'created_awaiting_reserve', 'created_reserve_paid'])(
769769
'should automatically navigate to review step when employment status is %s and display employment data',
770770
async (status) => {
771771
const employmentId = generateUniqueEmploymentId();

src/flows/ContractorOnboarding/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ export const shouldIncludeProduct = (
155155
*/
156156
export const reviewStepAllowedEmploymentStatus: Employment['status'][] = [
157157
'invited',
158+
'created_awaiting_reserve',
159+
'created_reserve_paid',
158160
];
159161

160162
export const disabledInviteButtonEmploymentStatus: Employment['status'][] = [
163+
'created_awaiting_reserve',
161164
'invited',
162165
];

0 commit comments

Comments
 (0)