+ );
+ }
+
+ if (profile && profile.status !== "pending_onboarding") {
+ // If target is /terms but status is not pending_onboarding, we should still not render SliderPage
+ // to prevent showing Onboarding to users who already finished it but have an unknown status.
+ return (
+
) : (
({
+ isFirstEntryCompleted: vi.fn(),
+}));
+
+vi.mock('./match-start-grace', () => ({
+ clearLegacyMatchSubmittedFlag: vi.fn(),
+ isWithinMatchStartGrace: vi.fn(),
+}));
+
+describe('getSubmitPath', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ vi.mocked(firstEntryHelper.isFirstEntryCompleted).mockReturnValue(true);
+ vi.mocked(matchStartGrace.isWithinMatchStartGrace).mockReturnValue(false);
+ });
+
+ const baseProfile: MarriageProfileResponse = {
+ status: 'pending_onboarding',
+ id: 1,
+ gender: 'male',
+ is_registering_for_self: true,
+ };
+
+ it('pending_onboarding returns /terms', () => {
+ expect(getSubmitPath({ ...baseProfile, status: 'pending_onboarding' })).toBe('/terms');
+ });
+
+ it('waiting returns /finding-match', () => {
+ expect(getSubmitPath({ ...baseProfile, status: 'waiting' })).toBe('/finding-match');
+ });
+
+ it('pending_info returns questions path', () => {
+ expect(getSubmitPath({ ...baseProfile, status: 'pending_info' })).toBe('/questions-list');
+
+ vi.mocked(firstEntryHelper.isFirstEntryCompleted).mockReturnValue(false);
+ expect(getSubmitPath({ ...baseProfile, status: 'pending_info' })).toBe('/questions-list/personal_info');
+ });
+
+ it('matched returns /request-accepted', () => {
+ expect(getSubmitPath({ ...baseProfile, status: 'matched' })).toBe('/request-accepted');
+ });
+
+ describe('active_case priority', () => {
+ it('returns /new-match when status="pending_info" but active_case is introduced and action pending', () => {
+ const profileWithCase = {
+ ...baseProfile,
+ status: 'pending_info' as const,
+ active_case: {
+ status: 'introduced' as const,
+ my_action: 'pending' as const,
+ },
+ };
+ // Type assertion added because the mock profile object is lacking many properties of the full MarriageProfileResponse,
+ // but it contains everything needed for the logic being tested.
+ expect(getSubmitPath(profileWithCase as any)).toBe('/new-match');
+ });
+
+ it('returns /request-accepted when status="pending_info" but active_case is payment_done', () => {
+ const profileWithCase = {
+ ...baseProfile,
+ status: 'pending_info' as const,
+ active_case: {
+ status: 'payment_done' as const,
+ my_action: 'pending' as const,
+ },
+ };
+ expect(getSubmitPath(profileWithCase as any)).toBe('/request-accepted');
+ });
+
+ it('returns /request-sent when status="waiting" but active_case is male_accepted and action done', () => {
+ const profileWithCase = {
+ ...baseProfile,
+ status: 'waiting' as const,
+ active_case: {
+ status: 'male_accepted' as const,
+ my_action: 'done' as const,
+ },
+ };
+ expect(getSubmitPath(profileWithCase as any)).toBe('/request-sent');
+ });
+ });
+});
diff --git a/src/translations/locales/ar.json b/src/translations/locales/ar.json
index 9247879..3df25fe 100644
--- a/src/translations/locales/ar.json
+++ b/src/translations/locales/ar.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/az.json b/src/translations/locales/az.json
index 7477ebc..eec7820 100644
--- a/src/translations/locales/az.json
+++ b/src/translations/locales/az.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/bn.json b/src/translations/locales/bn.json
index 5ea9ca7..0f542d6 100644
--- a/src/translations/locales/bn.json
+++ b/src/translations/locales/bn.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/da.json b/src/translations/locales/da.json
index dffe6c6..4a4c735 100644
--- a/src/translations/locales/da.json
+++ b/src/translations/locales/da.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/de.json b/src/translations/locales/de.json
index 74ba686..89d1cd7 100644
--- a/src/translations/locales/de.json
+++ b/src/translations/locales/de.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/en.json b/src/translations/locales/en.json
index 099ee24..bdf19a1 100644
--- a/src/translations/locales/en.json
+++ b/src/translations/locales/en.json
@@ -760,7 +760,6 @@
"⚠️ This section is completely confidential and is only used for matching and review by advisors.": "⚠️ This section is completely confidential and is only used for matching and review by advisors.",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Marriage advisors": "Marriage advisors",
- "Dr. Hasti Masoudi": "Dr. Hasti Masoudi",
"Specialist in clinical psychology": "Specialist in clinical psychology",
"Personal Development": "Personal Development",
"Family Counselor": "Family Counselor",
@@ -804,5 +803,6 @@
"Improving Mutual Understanding": "Improving Mutual Understanding",
"Helps individuals better understand their own needs as well as their partner’s motivations, preferences, and emotional priorities.": "Helps individuals better understand their own needs as well as their partner’s motivations, preferences, and emotional priorities.",
"Supporting More Suitable Match Recommendations": "Supporting More Suitable Match Recommendations",
- "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched.": "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched."
-}
+ "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched.": "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched.",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/es.json b/src/translations/locales/es.json
index c163f8a..806829d 100644
--- a/src/translations/locales/es.json
+++ b/src/translations/locales/es.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/fa.json b/src/translations/locales/fa.json
index 3148936..4c332f3 100644
--- a/src/translations/locales/fa.json
+++ b/src/translations/locales/fa.json
@@ -760,7 +760,6 @@
"⚠️ This section is completely confidential and is only used for matching and review by advisors.": "⚠️ این بخش کاملاً محرمانه است و فقط برای مچینگ و بررسی کارشناسان استفاده میشود.",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Marriage advisors": "مشاوران ازدواج",
- "Dr. Hasti Masoudi": "دکتر هستی مسعودی",
"Specialist in clinical psychology": "متخصص روانشناسی بالینی",
"Personal Development": "رشد فردی",
"Family Counselor": "مشاور خانواده",
@@ -804,5 +803,6 @@
"Improving Mutual Understanding": "بهبود درک متقابل",
"Helps individuals better understand their own needs as well as their partner’s motivations, preferences, and emotional priorities.": "به افراد کمک میکند تا نیازهای خود و همچنین انگیزهها، ترجیحات و اولویتهای عاطفی شریک زندگی خود را بهتر درک کنند.",
"Supporting More Suitable Match Recommendations": "پشتیبانی از پیشنهادهای همسریابی مناسبتر",
- "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched.": "ترکیب ارزیابی نیازها و شخصیت با مصاحبهها و سایر معیارهای ازدواج میتواند به شخصیسازی و هماهنگی بیشتر پیشنهادهای شریک زندگی کمک کند."
-}
+ "Combining needs and personality assessments with interviews and other marriage criteria can help make partner recommendations more personalized and well-matched.": "ترکیب ارزیابی نیازها و شخصیت با مصاحبهها و سایر معیارهای ازدواج میتواند به شخصیسازی و هماهنگی بیشتر پیشنهادهای شریک زندگی کمک کند.",
+ "Failed to update profile basic details. Please try again.": "بهروزرسانی اطلاعات اولیه پروفایل ناموفق بود. لطفاً دوباره تلاش کنید."
+}
\ No newline at end of file
diff --git a/src/translations/locales/fr.json b/src/translations/locales/fr.json
index 4cb027f..aefba62 100644
--- a/src/translations/locales/fr.json
+++ b/src/translations/locales/fr.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/gu.json b/src/translations/locales/gu.json
index 3fc63f8..926c717 100644
--- a/src/translations/locales/gu.json
+++ b/src/translations/locales/gu.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/ha.json b/src/translations/locales/ha.json
index 70f65d1..d30d484 100644
--- a/src/translations/locales/ha.json
+++ b/src/translations/locales/ha.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/he.json b/src/translations/locales/he.json
index 8f8ee63..2936a73 100644
--- a/src/translations/locales/he.json
+++ b/src/translations/locales/he.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/hi.json b/src/translations/locales/hi.json
index 6ad9589..3edfd52 100644
--- a/src/translations/locales/hi.json
+++ b/src/translations/locales/hi.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/id.json b/src/translations/locales/id.json
index 207c50e..4ba469f 100644
--- a/src/translations/locales/id.json
+++ b/src/translations/locales/id.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/ks.json b/src/translations/locales/ks.json
index 0b4a21f..4200af9 100644
--- a/src/translations/locales/ks.json
+++ b/src/translations/locales/ks.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/pt.json b/src/translations/locales/pt.json
index fea243e..7ffac86 100644
--- a/src/translations/locales/pt.json
+++ b/src/translations/locales/pt.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/ru.json b/src/translations/locales/ru.json
index 913f89e..6f4200a 100644
--- a/src/translations/locales/ru.json
+++ b/src/translations/locales/ru.json
@@ -758,5 +758,6 @@
"{completed} of {total} required steps completed": "Выполнено {completed} из {total} требуемых шагов",
"{days} days remaining of your subscription.": "{days} дней до конца вашей подписки.",
"⚠️ This section is completely confidential and is only used for matching and review by advisors.": "⚠️ Этот раздел полностью конфиденциальен и используется только консультантами для сопоставления и проверки.",
- "Please select the reason for cancellation:": "Пожалуйста, выберите причину отмены:"
-}
+ "Please select the reason for cancellation:": "Пожалуйста, выберите причину отмены:",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/sw.json b/src/translations/locales/sw.json
index 58cf9ed..63c428f 100644
--- a/src/translations/locales/sw.json
+++ b/src/translations/locales/sw.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/tg.json b/src/translations/locales/tg.json
index 8106b95..26ef8af 100644
--- a/src/translations/locales/tg.json
+++ b/src/translations/locales/tg.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/tr.json b/src/translations/locales/tr.json
index fc7a13c..0f1fcd3 100644
--- a/src/translations/locales/tr.json
+++ b/src/translations/locales/tr.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/ul.json b/src/translations/locales/ul.json
index 9aaa91c..5e5901b 100644
--- a/src/translations/locales/ul.json
+++ b/src/translations/locales/ul.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/ur.json b/src/translations/locales/ur.json
index 4739779..c088723 100644
--- a/src/translations/locales/ur.json
+++ b/src/translations/locales/ur.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/uz.json b/src/translations/locales/uz.json
index 29aa189..bcc1543 100644
--- a/src/translations/locales/uz.json
+++ b/src/translations/locales/uz.json
@@ -279,5 +279,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file
diff --git a/src/translations/locales/zh.json b/src/translations/locales/zh.json
index 81e6abc..d117526 100644
--- a/src/translations/locales/zh.json
+++ b/src/translations/locales/zh.json
@@ -753,5 +753,6 @@
"We are in the acquaintance/proposal process and nothing is finalized yet": "We are in the acquaintance/proposal process and nothing is finalized yet",
"Please select the reason for cancellation:": "Please select the reason for cancellation:",
"Swipe to continue": "Swipe to continue",
- "Swipe to confirm cancellation": "Swipe to confirm cancellation"
-}
+ "Swipe to confirm cancellation": "Swipe to confirm cancellation",
+ "Failed to update profile basic details. Please try again.": "Failed to update profile basic details. Please try again."
+}
\ No newline at end of file