Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions browser_tests/tests/dialogs/creditsTile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,12 @@ test.describe('Credits tile (Plan & Credits)', { tag: '@cloud' }, () => {
await mockCloudBoot(page, true, endedPersonalBillingStatus)

const content = await openPlanAndCredits(page)
await expect(content.getByText('Your subscription has ended')).toBeVisible()
await content.getByRole('button', { name: 'Billing & invoices' }).click()
const billingPortal = content.getByRole('button', {
name: 'Billing & invoices'
})
await expect(billingPortal).toBeVisible()
await expect(content.getByTestId('subscription-state-card')).toHaveCount(0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this wait for positively rendered ended-state panel content before asserting the card is absent? toHaveCount(0) can pass immediately while the asynchronous panel is still loading, so a regression that reintroduces the card could escape. Wait for the expected plan heading or another positive state signal first, then keep this absence check.

Current-head visual evidence: #16521 (comment)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 00d56b4. You are right, and it is the same failure mode this PR has been chasing — an absence assertion that an empty page satisfies.

This test had no positive panel assertion at all before the absence check, so I anchored it on the billing portal button:

const billingPortal = content.getByRole('button', { name: 'Billing & invoices' })
await expect(billingPortal).toBeVisible()
await expect(content.getByTestId('subscription-state-card')).toHaveCount(0)
await billingPortal.click()

Chose that over the plan heading or the badge deliberately: an ended Personal workspace lands in different branches depending on whether it can self-serve — isPersonalFree renders Free + Subscribe, otherwise the subscribed branch renders the badge. The portal button is present either way, so the wait does not silently depend on which branch this mock happens to hit.

await billingPortal.click()

await expect
.poll(() => page.locator('html').getAttribute('data-opened-url'))
Expand Down
5 changes: 4 additions & 1 deletion browser_tests/tests/dialogs/enterpriseTierCloud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,13 @@ test.describe('Enterprise workspace billing', { tag: '@cloud' }, () => {
)
const content = await workspace.openPlanAndCreditsSettings()

await expect(content.getByText('Your subscription has ended')).toBeVisible()
await expect(
content.getByRole('heading', { name: 'Enterprise' })
).toBeVisible()
await expect(content.getByTestId('plan-status-badge')).toHaveText(
'Inactive'
)
await expect(content.getByTestId('subscription-state-card')).toHaveCount(0)
await expect(
content.getByRole('button', { name: 'Add credits' })
).toBeVisible()
Expand Down
3 changes: 1 addition & 2 deletions src/locales/ar/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "لن يتم خصم أي رسوم أخرى منك. ستبقى ميزاتك نشطة حتى {date}.",
"descriptionWithoutDate": "لن يتم خصم أي رسوم أخرى. ستبقى ميزاتك نشطة حتى نهاية فترة الفوترة.",
"endedDescription": "لم يعد اشتراكك نشطًا.",
"endedTitle": "انتهى اشتراكك",
"title": "تم إلغاء اشتراكك"
},
"changePlan": "تغيير الخطة",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (ذاكرة 96GB VRAM)",
"haveQuestions": "هل لديك أسئلة أو ترغب في معرفة المزيد عن المؤسسات؟",
"inactive": {
"badge": "غير نشط",
"memberCta": "حسنًا، فهمت",
"memberDescription": "اطلب من مالك مساحة العمل إعادة تفعيل الاشتراك لتشغيل سير العمل.",
"memberRunTooltip": "تواصل مع مالك مساحة العمل لإعادة الاشتراك",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "Ihnen werden keine weiteren Kosten berechnet. Ihre Funktionen bleiben bis {date} aktiv.",
"descriptionWithoutDate": "Ihnen werden keine weiteren Kosten berechnet. Ihre Funktionen bleiben bis zum Ende Ihres Abrechnungszeitraums aktiv.",
"endedDescription": "Ihr Abonnement ist nicht mehr aktiv.",
"endedTitle": "Ihr Abonnement ist beendet",
"title": "Ihr Abonnement wurde gekündigt"
},
"changePlan": "Plan ändern",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "Haben Sie Fragen oder interessieren Sie sich für Enterprise?",
"inactive": {
"badge": "Inaktiv",
"memberCta": "OK, verstanden",
"memberDescription": "Bitten Sie den Workspace-Inhaber, das Abonnement des Workspace zu reaktivieren, um Workflows auszuführen.",
"memberRunTooltip": "Wenden Sie sich an den Workspace-Inhaber, um das Abonnement erneut abzuschließen",
Expand Down
7 changes: 3 additions & 4 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2834,9 +2834,7 @@
"canceledCard": {
"title": "Your subscription has been canceled",
"description": "You won't be charged again. Your features remain active until {date}.",
"descriptionWithoutDate": "You won't be charged again. Your features remain active until the end of your billing period.",
"endedTitle": "Your subscription has ended",
"endedDescription": "Your subscription is no longer active."
"descriptionWithoutDate": "You won't be charged again. Your features remain active until the end of your billing period."
},
"cancelSuccess": "Subscription cancelled successfully",
"cancelDialog": {
Expand Down Expand Up @@ -2975,7 +2973,8 @@
"memberDescription": "Ask your workspace owner to reactivate the workspace's subscription to run workflows.",
"memberCta": "Ok, got it",
"memberRunTooltip": "Contact your workspace owner to resubscribe",
"runLabel": "Run"
"runLabel": "Run",
"badge": "Inactive"
},
"paymentRecovery": {
"title": "Subscription paused",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/es/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "No se te cobrará de nuevo. Tus funciones seguirán activas hasta {date}.",
"descriptionWithoutDate": "No se te volverá a cobrar. Tus funciones seguirán activas hasta el final de tu periodo de facturación.",
"endedDescription": "Tu suscripción ya no está activa.",
"endedTitle": "Tu suscripción ha finalizado",
"title": "Tu suscripción ha sido cancelada"
},
"changePlan": "Cambiar plan",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "¿Tienes preguntas o buscas soluciones empresariales?",
"inactive": {
"badge": "Inactiva",
"memberCta": "Ok, entendido",
"memberDescription": "Pide al propietario del espacio de trabajo que reactive la suscripción para ejecutar flujos de trabajo.",
"memberRunTooltip": "Contacta al propietario del espacio de trabajo para volver a suscribirte",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/fa/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "دیگر هزینه‌ای از شما دریافت نمی‌شود. امکانات شما تا تاریخ {date} فعال خواهد بود.",
"descriptionWithoutDate": "دیگر هزینه‌ای از شما دریافت نمی‌شود. امکانات شما تا پایان دوره صورتحساب فعال خواهد بود.",
"endedDescription": "اشتراک شما دیگر فعال نیست.",
"endedTitle": "اشتراک شما به پایان رسیده است",
"title": "اشتراک شما لغو شده است"
},
"changePlan": "تغییر پلن",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (۹۶ گیگابایت VRAM)",
"haveQuestions": "سوالی دارید یا به دنبال راهکار سازمانی هستید؟",
"inactive": {
"badge": "غیرفعال",
"memberCta": "باشه، متوجه شدم",
"memberDescription": "از مالک فضای کاری خود بخواهید تا اشتراک را برای اجرای workflowها فعال کند.",
"memberRunTooltip": "برای تمدید اشتراک با مالک فضای کاری تماس بگیرید",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/fr/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "Vous ne serez plus facturé. Vos fonctionnalités restent actives jusqu'au {date}.",
"descriptionWithoutDate": "Vous ne serez plus facturé. Vos fonctionnalités restent actives jusqu’à la fin de votre période de facturation.",
"endedDescription": "Votre abonnement n’est plus actif.",
"endedTitle": "Votre abonnement a pris fin",
"title": "Votre abonnement a été annulé"
},
"changePlan": "Changer d’abonnement",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "Des questions ou besoin d'une offre entreprise ?",
"inactive": {
"badge": "Inactif",
"memberCta": "Ok, compris",
"memberDescription": "Demandez au propriétaire de l’espace de travail de réactiver l’abonnement pour exécuter des workflows.",
"memberRunTooltip": "Contactez le propriétaire de votre espace de travail pour réactiver l’abonnement",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/he/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "לא תחויב שוב. התכונות שלך יישארו פעילות עד {date}.",
"descriptionWithoutDate": "לא תחויבו שוב. הפיצ'רים שלכם יישארו פעילים עד לסיום תקופת החיוב.",
"endedDescription": "המנוי שלכם אינו פעיל יותר.",
"endedTitle": "המנוי שלכם הסתיים",
"title": "המנוי שלך בוטל"
},
"changePlan": "שנה תוכנית",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "יש לך שאלות או מתעניין במסלול ארגוני (enterprise)?",
"inactive": {
"badge": "לא פעיל",
"memberCta": "הבנתי",
"memberDescription": "פנה לבעלים של מרחב העבודה כדי להפעיל מחדש את המנוי ולהריץ תהליכי עבודה.",
"memberRunTooltip": "פנה לבעלים של מרחב העבודה כדי לחדש מנוי",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/it/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "Non ti verrà più addebitato nulla. Le tue funzionalità rimarranno attive fino al {date}.",
"descriptionWithoutDate": "Non ti verrà più addebitato nulla. Le tue funzionalità rimarranno attive fino alla fine del periodo di fatturazione.",
"endedDescription": "Il tuo abbonamento non è più attivo.",
"endedTitle": "Il tuo abbonamento è terminato",
"title": "Il tuo abbonamento è stato annullato"
},
"changePlan": "Cambia piano",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "Hai domande o sei interessato all'enterprise?",
"inactive": {
"badge": "Inattivo",
"memberCta": "Ok, capito",
"memberDescription": "Chiedi al proprietario del workspace di riattivare l'abbonamento per eseguire workflow.",
"memberRunTooltip": "Contatta il proprietario del workspace per riabbonarsi",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/ja/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "今後請求されることはありません。{date}まで機能は有効です。",
"descriptionWithoutDate": "今後請求は発生しません。機能は請求期間の終了まで有効です。",
"endedDescription": "サブスクリプションは無効になりました。",
"endedTitle": "サブスクリプションが終了しました",
"title": "サブスクリプションはキャンセルされました"
},
"changePlan": "プランを変更",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro(96GB VRAM)",
"haveQuestions": "ご質問やエンタープライズについてのお問い合わせはこちら",
"inactive": {
"badge": "無効",
"memberCta": "了解しました",
"memberDescription": "ワークスペースのオーナーに連絡して、サブスクリプションを再有効化してワークフローを実行してください。",
"memberRunTooltip": "ワークスペースのオーナーに再購読を依頼してください",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/ko/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "더 이상 결제되지 않습니다. {date}까지 기능을 계속 사용할 수 있습니다.",
"descriptionWithoutDate": "더 이상 결제되지 않습니다. 현재 결제 주기까지 기능이 계속 활성화됩니다.",
"endedDescription": "구독이 더 이상 활성화되어 있지 않습니다.",
"endedTitle": "구독이 종료되었습니다",
"title": "구독이 취소되었습니다"
},
"changePlan": "요금제 변경",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "질문이 있거나 엔터프라이즈가 궁금하신가요?",
"inactive": {
"badge": "비활성",
"memberCta": "확인",
"memberDescription": "워크스페이스 소유자에게 구독을 다시 활성화하여 워크플로우를 실행할 수 있도록 요청하세요.",
"memberRunTooltip": "워크스페이스 소유자에게 재구독을 문의하세요",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/pt-BR/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "Você não será mais cobrado. Seus recursos permanecem ativos até {date}.",
"descriptionWithoutDate": "Você não será cobrado novamente. Seus recursos permanecem ativos até o final do seu período de cobrança.",
"endedDescription": "Sua assinatura não está mais ativa.",
"endedTitle": "Sua assinatura foi encerrada",
"title": "Sua assinatura foi cancelada"
},
"changePlan": "Alterar plano",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "Tem dúvidas ou interesse em soluções empresariais?",
"inactive": {
"badge": "Inativo",
"memberCta": "Ok, entendi",
"memberDescription": "Peça ao proprietário do workspace para reativar a assinatura e executar fluxos de trabalho.",
"memberRunTooltip": "Entre em contato com o proprietário do workspace para reativar a assinatura",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/ru/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "С вас больше не будет взиматься плата. Ваши функции останутся активными до {date}.",
"descriptionWithoutDate": "С вас больше не будет взиматься плата. Ваши функции останутся активными до конца расчетного периода.",
"endedDescription": "Ваша подписка больше не активна.",
"endedTitle": "Ваша подписка завершена",
"title": "Ваша подписка отменена"
},
"changePlan": "Сменить тариф",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96ГБ VRAM)",
"haveQuestions": "Есть вопросы или интересует корпоративное решение?",
"inactive": {
"badge": "Неактивно",
"memberCta": "Ок, понятно",
"memberDescription": "Попросите владельца рабочего пространства возобновить подписку, чтобы запускать рабочие процессы.",
"memberRunTooltip": "Свяжитесь с владельцем рабочего пространства для повторной подписки",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/tr/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "Tekrar ücretlendirilmeyeceksiniz. Özellikleriniz {date} tarihine kadar aktif kalacak.",
"descriptionWithoutDate": "Tekrar ücretlendirilmeyeceksiniz. Özellikleriniz fatura dönemi sonuna kadar aktif kalacak.",
"endedDescription": "Aboneliğiniz artık aktif değil.",
"endedTitle": "Aboneliğiniz sona erdi",
"title": "Aboneliğiniz iptal edildi"
},
"changePlan": "Planı değiştir",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "Sorularınız mı var veya kurumsal çözüm mü arıyorsunuz?",
"inactive": {
"badge": "Pasif",
"memberCta": "Tamam, anladım",
"memberDescription": "Çalışma alanı sahibinizden iş akışlarını çalıştırmak için aboneliği yeniden etkinleştirmesini isteyin.",
"memberRunTooltip": "Yeniden abone olmak için çalışma alanı sahibinizle iletişime geçin",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/zh-TW/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "您將不會再次被收費。您的功能將持續至 {date}。",
"descriptionWithoutDate": "您將不會再次被收費。您的功能會持續啟用至本期帳單結束。",
"endedDescription": "您的訂閱已不再有效。",
"endedTitle": "您的訂閱已結束",
"title": "您的訂閱已取消"
},
"changePlan": "更改方案",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro(96GB VRAM)",
"haveQuestions": "有疑問或想了解企業方案?",
"inactive": {
"badge": "已停用",
"memberCta": "好的,知道了",
"memberDescription": "請聯絡您的工作區擁有者以重新啟用訂閱,才能執行工作流程。",
"memberRunTooltip": "請聯絡您的工作區擁有者重新訂閱",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/zh/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4265,8 +4265,6 @@
"canceledCard": {
"description": "您将不再被扣费。您的功能将在 {date} 前保持激活。",
"descriptionWithoutDate": "您将不会再次被扣费。您的功能将在本计费周期结束前保持激活状态。",
"endedDescription": "您的订阅已不再激活。",
"endedTitle": "您的订阅已结束",
"title": "您的订阅已被取消"
},
"changePlan": "更改套餐",
Expand Down Expand Up @@ -4321,6 +4319,7 @@
"gpuLabel": "RTX 6000 Pro (96GB VRAM)",
"haveQuestions": "对企业级有疑问?",
"inactive": {
"badge": "已失效",
"memberCta": "好的,知道了",
"memberDescription": "请联系您的工作区所有者,重新激活订阅以运行工作流。",
"memberRunTooltip": "请联系您的工作区所有者重新订阅",
Expand Down
Loading
Loading