@iblai/iblai-js 2.71.1 → 2.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/data-layer/playwright/billing-tab-helpers.d.ts +61 -48
  2. package/dist/data-layer/playwright/credit-balance-helpers.d.ts +40 -18
  3. package/dist/data-layer/playwright/index.d.ts +3 -2
  4. package/dist/data-layer/playwright/plan-picker-helpers.d.ts +26 -0
  5. package/dist/data-layer/playwright/spend-limits-helpers.d.ts +5 -4
  6. package/dist/playwright/index.cjs +306 -193
  7. package/dist/playwright/index.cjs.map +1 -1
  8. package/dist/playwright/index.d.ts +133 -71
  9. package/dist/playwright/index.esm.js +293 -194
  10. package/dist/playwright/index.esm.js.map +1 -1
  11. package/dist/playwright/playwright/billing-tab-helpers.d.ts +61 -48
  12. package/dist/playwright/playwright/credit-balance-helpers.d.ts +40 -18
  13. package/dist/playwright/playwright/index.d.ts +3 -2
  14. package/dist/playwright/playwright/plan-picker-helpers.d.ts +26 -0
  15. package/dist/playwright/playwright/spend-limits-helpers.d.ts +5 -4
  16. package/dist/security/playwright/billing-tab-helpers.d.ts +61 -48
  17. package/dist/security/playwright/credit-balance-helpers.d.ts +40 -18
  18. package/dist/security/playwright/index.d.ts +3 -2
  19. package/dist/security/playwright/plan-picker-helpers.d.ts +26 -0
  20. package/dist/security/playwright/spend-limits-helpers.d.ts +5 -4
  21. package/dist/web-containers/playwright/billing-tab-helpers.d.ts +61 -48
  22. package/dist/web-containers/playwright/credit-balance-helpers.d.ts +40 -18
  23. package/dist/web-containers/playwright/index.d.ts +3 -2
  24. package/dist/web-containers/playwright/plan-picker-helpers.d.ts +26 -0
  25. package/dist/web-containers/playwright/spend-limits-helpers.d.ts +5 -4
  26. package/dist/web-containers/source/add-credits-modal.js +170 -24
  27. package/dist/web-containers/source/add-credits-modal.js.map +1 -1
  28. package/dist/web-containers/source/auto-recharge-modal.js +1 -1
  29. package/dist/web-containers/source/auto-recharge-modal.js.map +1 -1
  30. package/dist/web-containers/source/billing-credits.js +4 -4
  31. package/dist/web-containers/source/billing-credits.js.map +1 -1
  32. package/dist/web-containers/source/billing.js +60 -101
  33. package/dist/web-containers/source/billing.js.map +1 -1
  34. package/dist/web-containers/source/components/credit-balance.js +44 -72
  35. package/dist/web-containers/source/components/credit-balance.js.map +1 -1
  36. package/dist/web-containers/source/components/modals/contact-admin-modal.js +32 -0
  37. package/dist/web-containers/source/components/modals/contact-admin-modal.js.map +1 -0
  38. package/dist/web-containers/source/components/modals/upgrade-package-modal.js +281 -20
  39. package/dist/web-containers/source/components/modals/upgrade-package-modal.js.map +1 -1
  40. package/dist/web-containers/source/components/profile/add-credits-modal.js +170 -24
  41. package/dist/web-containers/source/components/profile/add-credits-modal.js.map +1 -1
  42. package/dist/web-containers/source/components/profile/auto-recharge-modal.js +1 -1
  43. package/dist/web-containers/source/components/profile/auto-recharge-modal.js.map +1 -1
  44. package/dist/web-containers/source/components/profile/billing-credits.js +4 -4
  45. package/dist/web-containers/source/components/profile/billing-credits.js.map +1 -1
  46. package/dist/web-containers/source/components/profile/billing.js +60 -101
  47. package/dist/web-containers/source/components/profile/billing.js.map +1 -1
  48. package/dist/web-containers/source/components/profile/pending-credit-top-up.js +202 -0
  49. package/dist/web-containers/source/components/profile/pending-credit-top-up.js.map +1 -0
  50. package/dist/web-containers/source/components/profile/use-complete-pending-credit-top-up.js +68 -0
  51. package/dist/web-containers/source/components/profile/use-complete-pending-credit-top-up.js.map +1 -0
  52. package/dist/web-containers/source/components/subscription-top-banner.js +119 -0
  53. package/dist/web-containers/source/components/subscription-top-banner.js.map +1 -0
  54. package/dist/web-containers/source/components/welcome-chat/welcome-message.js +23 -3
  55. package/dist/web-containers/source/components/welcome-chat/welcome-message.js.map +1 -1
  56. package/dist/web-containers/source/contact-admin-modal.js +32 -0
  57. package/dist/web-containers/source/contact-admin-modal.js.map +1 -0
  58. package/dist/web-containers/source/credit-balance.js +44 -72
  59. package/dist/web-containers/source/credit-balance.js.map +1 -1
  60. package/dist/web-containers/source/en.json.js +125 -21
  61. package/dist/web-containers/source/en.json.js.map +1 -1
  62. package/dist/web-containers/source/es.json.js +127 -23
  63. package/dist/web-containers/source/es.json.js.map +1 -1
  64. package/dist/web-containers/source/fr.json.js +125 -21
  65. package/dist/web-containers/source/fr.json.js.map +1 -1
  66. package/dist/web-containers/source/i18n/messages/en.json.js +125 -21
  67. package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
  68. package/dist/web-containers/source/i18n/messages/es.json.js +127 -23
  69. package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
  70. package/dist/web-containers/source/i18n/messages/fr.json.js +125 -21
  71. package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
  72. package/dist/web-containers/source/i18n/messages/zh.json.js +126 -22
  73. package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
  74. package/dist/web-containers/source/messages/en.json.js +125 -21
  75. package/dist/web-containers/source/messages/en.json.js.map +1 -1
  76. package/dist/web-containers/source/messages/es.json.js +127 -23
  77. package/dist/web-containers/source/messages/es.json.js.map +1 -1
  78. package/dist/web-containers/source/messages/fr.json.js +125 -21
  79. package/dist/web-containers/source/messages/fr.json.js.map +1 -1
  80. package/dist/web-containers/source/messages/zh.json.js +126 -22
  81. package/dist/web-containers/source/messages/zh.json.js.map +1 -1
  82. package/dist/web-containers/source/modals/contact-admin-modal.js +32 -0
  83. package/dist/web-containers/source/modals/contact-admin-modal.js.map +1 -0
  84. package/dist/web-containers/source/modals/upgrade-package-modal.js +281 -20
  85. package/dist/web-containers/source/modals/upgrade-package-modal.js.map +1 -1
  86. package/dist/web-containers/source/pending-credit-top-up.js +202 -0
  87. package/dist/web-containers/source/pending-credit-top-up.js.map +1 -0
  88. package/dist/web-containers/source/profile/add-credits-modal.js +170 -24
  89. package/dist/web-containers/source/profile/add-credits-modal.js.map +1 -1
  90. package/dist/web-containers/source/profile/auto-recharge-modal.js +1 -1
  91. package/dist/web-containers/source/profile/auto-recharge-modal.js.map +1 -1
  92. package/dist/web-containers/source/profile/billing-credits.js +4 -4
  93. package/dist/web-containers/source/profile/billing-credits.js.map +1 -1
  94. package/dist/web-containers/source/profile/billing.js +60 -101
  95. package/dist/web-containers/source/profile/billing.js.map +1 -1
  96. package/dist/web-containers/source/profile/pending-credit-top-up.js +202 -0
  97. package/dist/web-containers/source/profile/pending-credit-top-up.js.map +1 -0
  98. package/dist/web-containers/source/profile/use-complete-pending-credit-top-up.js +68 -0
  99. package/dist/web-containers/source/profile/use-complete-pending-credit-top-up.js.map +1 -0
  100. package/dist/web-containers/source/subscription-top-banner.js +119 -0
  101. package/dist/web-containers/source/subscription-top-banner.js.map +1 -0
  102. package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
  103. package/dist/web-containers/source/upgrade-package-modal.js +281 -20
  104. package/dist/web-containers/source/upgrade-package-modal.js.map +1 -1
  105. package/dist/web-containers/source/use-complete-pending-credit-top-up.js +68 -0
  106. package/dist/web-containers/source/use-complete-pending-credit-top-up.js.map +1 -0
  107. package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
  108. package/dist/web-containers/source/welcome-chat/welcome-message.js +23 -3
  109. package/dist/web-containers/source/welcome-chat/welcome-message.js.map +1 -1
  110. package/dist/web-containers/source/welcome-message.js +23 -3
  111. package/dist/web-containers/source/welcome-message.js.map +1 -1
  112. package/dist/web-containers/source/zh.json.js +126 -22
  113. package/dist/web-containers/source/zh.json.js.map +1 -1
  114. package/dist/web-utils/playwright/billing-tab-helpers.d.ts +61 -48
  115. package/dist/web-utils/playwright/credit-balance-helpers.d.ts +40 -18
  116. package/dist/web-utils/playwright/index.d.ts +3 -2
  117. package/dist/web-utils/playwright/plan-picker-helpers.d.ts +26 -0
  118. package/dist/web-utils/playwright/spend-limits-helpers.d.ts +5 -4
  119. package/package.json +5 -5
@@ -1,88 +1,101 @@
1
1
  import { Locator, Page } from '@playwright/test';
2
2
  import type { CreditBalancePlan } from './credit-balance-helpers';
3
3
  export type BillingAutoRechargeStatus = 'Enabled' | 'Disabled';
4
- /** Locator for the Plan section card on the BillingTab. */
5
- export declare function billingPlanSection(page: Page): Locator;
6
- /** Locator for the Credits section card on the BillingTab. */
4
+ /** Locator for the Credits section card on the BillingTab (there is no Plan card). */
7
5
  export declare function billingCreditsSection(page: Page): Locator;
8
6
  /** Locator for the Auto Recharge section card on the BillingTab.
9
- * This section is only rendered for non-Free plans with a payment method on file.
7
+ * Rendered whenever a payment method is on file (never on the free trial).
10
8
  */
11
9
  export declare function billingAutoRechargeSection(page: Page): Locator;
12
- /** Reads the plan label (Free / Trial / Premium) from the Plan section. */
10
+ /**
11
+ * Detects the billing state from the Credits section: "Trial" when it offers
12
+ * "Upgrade" (the plan picker), "Free" otherwise. Returns null while the
13
+ * section is not rendered (loading skeletons).
14
+ */
13
15
  export declare function getBillingPlanLabel(page: Page): Promise<CreditBalancePlan | null>;
14
16
  /** Reads the auto-recharge status badge (Enabled / Disabled) when the section is rendered. */
15
17
  export declare function getBillingAutoRechargeStatus(page: Page): Promise<BillingAutoRechargeStatus | null>;
16
- /** Waits for the BillingTab loading skeletons to clear by waiting for the Plan
17
- * section card to mount. */
18
+ /** Waits for the BillingTab loading skeletons to clear by waiting for the
19
+ * Credits section card to mount. */
18
20
  export declare function waitForBillingTabReady(page: Page): Promise<void>;
19
- /**
20
- * Asserts the Plan section state for a given plan. Verifies:
21
- * - The plan label text matches `options.plan`
22
- * - The "Current" pill is visible
23
- * - The Upgrade button is visible iff the plan is not Premium
24
- */
25
- export declare function expectBillingPlanSection(page: Page, options: {
26
- plan: CreditBalancePlan;
27
- }): Promise<void>;
28
21
  /**
29
22
  * Asserts the Credits section state. Always verifies the "Available" stat row.
30
23
  * The action button rule mirrors the component:
31
- * - Free plan → no Add Credits / Manage Billing button
32
- * - Non-Free + hasPaymentMethod=true → "Add Credits" visible, "Manage Billing" absent
33
- * - Non-Free + hasPaymentMethod=false → "Manage Billing" visible, "Add Credits" absent
34
- * - Non-Free with hasPaymentMethod omitted → only the "Available" row is asserted
24
+ * - Trial → "Upgrade" visible; no Add Credits
25
+ * - Free → "Add Credits" visible whether or not a card is on file (the
26
+ * dialog collects one on Stripe first when there is none); never
27
+ * "Upgrade". `hasPaymentMethod` only matters to the Auto
28
+ * Recharge section (see `expectBillingAutoRechargeSection`).
35
29
  */
36
30
  export declare function expectBillingCreditsSection(page: Page, options: {
37
31
  plan: CreditBalancePlan;
38
32
  hasPaymentMethod?: boolean;
39
33
  }): Promise<void>;
40
34
  /**
41
- * Asserts the Auto Recharge section visibility. Section is rendered only when
42
- * `hasPaymentMethod && !isFreePlan` in the component. Pass `expectVisible: false`
43
- * to assert the section is absent. When visible and `status` is provided, also
44
- * asserts the Enabled/Disabled badge text.
35
+ * Asserts the Auto Recharge section visibility. The component renders it when
36
+ * a payment method is on file and the account is not on the free trial. Pass
37
+ * `expectVisible: false` to assert the section is absent. When visible and
38
+ * `status` is provided, also asserts the Enabled/Disabled badge text.
45
39
  */
46
40
  export declare function expectBillingAutoRechargeSection(page: Page, options: {
47
41
  expectVisible: boolean;
48
42
  status?: BillingAutoRechargeStatus;
49
43
  }): Promise<void>;
50
44
  /**
51
- * Free plan: Plan="Free" with Upgrade visible; Credits section has no action;
52
- * Auto Recharge section is hidden entirely (regardless of has_payment_method).
53
- */
54
- export declare function expectBillingTabForFreePlan(page: Page): Promise<void>;
55
- /**
56
- * Trial plan: Plan="Trial" with Upgrade visible; Credits action depends on
57
- * `hasPaymentMethod` (Add Credits when true, Manage Billing when false);
58
- * Auto Recharge section is rendered iff `hasPaymentMethod` is true.
45
+ * Free plan: no "Upgrade", "Add Credits" always; the Auto Recharge section
46
+ * follows `hasPaymentMethod` (shown when true, absent when false). With
47
+ * `hasPaymentMethod` omitted only the Credits card is verified.
59
48
  */
60
- export declare function expectBillingTabForTrialPlan(page: Page, options: {
61
- hasPaymentMethod: boolean;
49
+ export declare function expectBillingTabForStandardPlan(page: Page, options?: {
50
+ hasPaymentMethod?: boolean;
62
51
  }): Promise<void>;
63
52
  /**
64
- * Premium plan: Plan="Premium" with Upgrade hidden; Credits action depends on
65
- * `hasPaymentMethod` (Add Credits when true, Manage Billing when false);
66
- * Auto Recharge section is rendered iff `hasPaymentMethod` is true.
53
+ * Trial: "Upgrade" (opens the plan picker) is the only Credits action and the
54
+ * Auto Recharge section is hidden entirely (regardless of has_payment_method).
67
55
  */
68
- export declare function expectBillingTabForPremiumPlan(page: Page, options: {
69
- hasPaymentMethod: boolean;
70
- }): Promise<void>;
56
+ export declare function expectBillingTabForTrialPlan(page: Page): Promise<void>;
71
57
  /**
72
- * Convenience: detects the active plan from the Plan section badge and runs
73
- * the matching state assertions. Returns the detected plan.
58
+ * Convenience: detects the billing state from the Credits section and runs
59
+ * the matching assertions. Returns the detected plan.
74
60
  *
75
- * For non-Free plans, pass `hasPaymentMethod` to assert the Credits/Auto Recharge
76
- * sub-states; if omitted, only the Plan section + base Credits row is verified.
61
+ * On the Free plan, pass `hasPaymentMethod` to assert the Credits/Auto Recharge
62
+ * sub-states; if omitted, only the base Credits row is verified.
77
63
  */
78
64
  export declare function expectBillingTabForCurrentPlan(page: Page, options?: {
79
65
  hasPaymentMethod?: boolean;
80
66
  }): Promise<CreditBalancePlan>;
81
- /** Clicks the Upgrade button in the Plan section (visible only on non-Premium plans). */
67
+ /** Clicks the Upgrade button in the Credits section (free trial only); it opens the plan picker. */
82
68
  export declare function clickBillingUpgrade(page: Page): Promise<void>;
83
- /** Clicks the Add Credits button in the Credits section (non-Free + has payment method). */
69
+ /** Clicks Upgrade in the Credits section and waits for the plan picker to show its plans. */
70
+ export declare function openPlanPickerFromBilling(page: Page): Promise<Locator>;
71
+ /** Clicks the Add Credits button in the Credits section (Free plan, with or without a card). */
84
72
  export declare function clickBillingAddCredits(page: Page): Promise<void>;
85
- /** Clicks the Manage Billing button in the Credits section (non-Free + no payment method). */
86
- export declare function clickBillingManageBilling(page: Page): Promise<void>;
73
+ /** Locator for the Add Credits dialog (opened from the Billing tab or the credit dropdown). */
74
+ export declare function addCreditsDialog(page: Page): Locator;
75
+ /**
76
+ * Types a USD amount into the open Add Credits dialog and submits it. With a
77
+ * payment method on file the submit button reads "Add Credits" and the charge
78
+ * runs at once; without one it reads "Continue" and the page navigates to the
79
+ * Stripe customer portal to save a card (the charge runs when Stripe returns
80
+ * to the app). Returns once that finished (the dialog closed after the
81
+ * charge, or the browser left for Stripe), with which of the two buttons was
82
+ * pressed. A refused charge keeps the dialog open, so this then times out.
83
+ */
84
+ export declare function submitAddCreditsAmount(page: Page, amountUsd: string | number): Promise<'Add Credits' | 'Continue'>;
87
85
  /** Clicks the Manage Usage button in the Auto Recharge section. */
88
86
  export declare function clickBillingManageUsage(page: Page): Promise<void>;
87
+ /** @deprecated There is no Plan card any more; use `billingCreditsSection`. */
88
+ export declare const billingPlanSection: typeof billingCreditsSection;
89
+ /** @deprecated The plan now shows in the Credits card; use `expectBillingCreditsSection`. */
90
+ export declare const expectBillingPlanSection: typeof expectBillingCreditsSection;
91
+ /** @deprecated The Free plan is now the free trial; use `expectBillingTabForTrialPlan`. */
92
+ export declare const expectBillingTabForFreePlan: typeof expectBillingTabForTrialPlan;
93
+ /** @deprecated The Premium plan is now the Free plan; use `expectBillingTabForStandardPlan`. */
94
+ export declare const expectBillingTabForPremiumPlan: typeof expectBillingTabForStandardPlan;
95
+ /** @deprecated The trial button reads "Upgrade" and opens the plan picker; use `clickBillingUpgrade`. */
96
+ export declare const clickBillingUpgradeToStandard: typeof clickBillingUpgrade;
97
+ /**
98
+ * @deprecated Manage Billing is gone; Add Credits collects a card when none is on file. Use
99
+ * `clickBillingAddCredits`. Note it opens the Add Credits dialog and no longer leaves for Stripe.
100
+ */
101
+ export declare const clickBillingManageBilling: typeof clickBillingAddCredits;
@@ -1,5 +1,11 @@
1
1
  import { Locator, Page } from '@playwright/test';
2
- export type CreditBalancePlan = 'Free' | 'Trial' | 'Premium';
2
+ /**
3
+ * The two billing states the helpers tell apart: the free trial (main tenant,
4
+ * no workspace of your own yet) and an account on a plan, where credits are
5
+ * bought as needed. Every plan (Free, Pro, Max, ...) reads as `'Free'` here;
6
+ * the badge itself shows the plan's name.
7
+ */
8
+ export type CreditBalancePlan = 'Free' | 'Trial';
3
9
  /**
4
10
  * Reads `current_tenant` from localStorage and returns its `show_paywall` flag.
5
11
  * Returns false if the entry is missing, malformed, or the flag is unset.
@@ -9,7 +15,7 @@ export declare function getCurrentTenantShowPaywall(page: Page): Promise<boolean
9
15
  export declare function creditBalanceTrigger(page: Page): Locator;
10
16
  /** Locator for the credit-balance dropdown panel (rendered in a Radix portal). */
11
17
  export declare function creditBalancePanel(page: Page): Locator;
12
- /** Locator for the plan badge (Free / Trial / Premium) inside the open panel. */
18
+ /** Locator for the plan badge (Trial, Free or the plan's name) inside the open panel. */
13
19
  export declare function creditBalancePlanBadge(page: Page): Locator;
14
20
  /**
15
21
  * Asserts the credit-balance trigger is visible iff the current tenant has
@@ -35,39 +41,55 @@ export declare function waitForCreditBalanceLoaded(page: Page): Promise<void>;
35
41
  /** Closes the credit-balance dropdown via Escape and waits for it to detach. */
36
42
  export declare function closeCreditBalanceDropdown(page: Page): Promise<void>;
37
43
  /**
38
- * Reads the plan label text from the open panel. Returns null if the badge is
39
- * not rendered (e.g. billing data still loading or errored).
44
+ * Reads the billing state from the open panel's badge: `'Trial'` on the free
45
+ * trial, `'Free'` for an account on any plan (the badge then shows "Free" or
46
+ * the plan's name). Returns null if the badge is not rendered (e.g. billing
47
+ * data still loading or errored).
40
48
  */
41
49
  export declare function getCreditBalancePlanLabel(page: Page): Promise<CreditBalancePlan | null>;
42
50
  /**
43
51
  * Reads the "Remaining" credits value from the open panel ("X,XXX Credits").
44
- * Returns null when the row is not rendered or unparseable.
52
+ * Returns null when the row is not rendered or unparseable. The panel shows
53
+ * cached data while it refetches, so after a top-up read it through
54
+ * `expect.poll(() => getCreditBalanceRemaining(page))`.
45
55
  */
46
56
  export declare function getCreditBalanceRemaining(page: Page): Promise<number | null>;
47
57
  /**
48
- * Free plan UI: Upgrade Plan only. No payment buttons. No auto-recharge section.
58
+ * UI for an account on a plan: never an "Upgrade" button; "Add Credits" always.
59
+ * - With a payment method: Manage Usage + Add Credits and the Auto Recharge section.
60
+ * - Without one: Add Credits alone (the dialog collects a card on Stripe first),
61
+ * no Manage Usage, no Auto Recharge section.
62
+ * - `hasPaymentMethod` omitted: only the badge, Add Credits and the absence of
63
+ * Upgrade are checked.
64
+ * - `planName`: the exact badge text ("Free", "Max"); omitted, any plan but
65
+ * the trial passes.
49
66
  */
50
- export declare function expectCreditBalancePanelForFreePlan(page: Page): Promise<void>;
67
+ export declare function expectCreditBalancePanelForStandardPlan(page: Page, options?: {
68
+ hasPaymentMethod?: boolean;
69
+ planName?: string;
70
+ }): Promise<void>;
51
71
  /**
52
- * Trial plan UI: Upgrade Plan only. No Manage Usage / Add Credits / Manage Billing.
72
+ * Trial UI: "Upgrade" only (it opens the plan picker). No Manage Usage /
73
+ * Add Credits, and no Auto Recharge section.
53
74
  */
54
75
  export declare function expectCreditBalancePanelForTrialPlan(page: Page): Promise<void>;
55
- /**
56
- * Premium plan UI: Upgrade Plan must NOT appear.
57
- * - With payment method: Manage Usage + Add Credits both visible; Manage Billing hidden.
58
- * - Without payment method: Manage Billing visible; Manage Usage + Add Credits hidden.
59
- */
60
- export declare function expectCreditBalancePanelForPremiumPlan(page: Page, options: {
61
- hasPaymentMethod: boolean;
62
- }): Promise<void>;
63
76
  /**
64
77
  * Convenience: opens the dropdown, detects the active plan from the badge,
65
78
  * and runs the matching state assertions on the already-open panel. Returns
66
79
  * the detected plan label.
67
80
  *
68
- * For Premium plans you may pass `hasPaymentMethod` to assert the specific
69
- * sub-state; if omitted on Premium, only the "no Upgrade Plan button" check runs.
81
+ * On the Free plan you may pass `hasPaymentMethod` to assert the specific
82
+ * sub-state; if omitted, only the absence of "Upgrade" is checked.
70
83
  */
71
84
  export declare function expectCreditBalanceForCurrentPlan(page: Page, options?: {
72
85
  hasPaymentMethod?: boolean;
73
86
  }): Promise<CreditBalancePlan>;
87
+ /**
88
+ * Clicks "Upgrade" in the credit balance dropdown (free trial only) and waits
89
+ * for the plan picker to show its plans.
90
+ */
91
+ export declare function openPlanPickerFromCreditBalance(page: Page): Promise<Locator>;
92
+ /** @deprecated The Free plan is now the free trial; use `expectCreditBalancePanelForTrialPlan`. */
93
+ export declare const expectCreditBalancePanelForFreePlan: typeof expectCreditBalancePanelForTrialPlan;
94
+ /** @deprecated The Premium plan is now the Free plan; use `expectCreditBalancePanelForStandardPlan`. */
95
+ export declare const expectCreditBalancePanelForPremiumPlan: typeof expectCreditBalancePanelForStandardPlan;
@@ -23,7 +23,7 @@ export type { AgentPromptField, SandboxKind } from './claw-sandbox-helpers';
23
23
  export { switchToSkillsTab, verifySkillsTabVisible, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, goToSkillsListPage, verifySkillsEmptyState, verifyAgentSkillsEmptyState, getSkillRowCount, verifySkillVisible, addSkillToAgent, verifySkillAdded, removeSkillFromAgent, isSkillEnabled, enableSkill, disableSkill, toggleSkill, setCatalogSkillEnabled, openNewSkillDialog, createSkill, openSkillActionsMenu, openEditSkillDialog, editSkill, deleteSkill, cancelDeleteSkill, switchToSkillResourcesSubTab, addTextResource, uploadAssetResource, editTextResource, deleteResource, openSlashSkillPicker, selectSlashSkill, } from './agent-skills-helpers';
24
24
  export type { SkillFormValues, TextResourceValues } from './agent-skills-helpers';
25
25
  export { navigateToAuditLog, verifyAuditLogTableVisible, getAuditLogRowCount, verifyAuditLogEntryStructure, verifyAuditLogEmptyState, verifyAuditLogPermissionError, verifyAuditLogGenericError, verifyAuditLogLoading, waitForAuditLogDataLoaded, filterByAction, filterByActor, getAvailableActors, filterByDateRange, clearDateRangeFilter, getPaginationInfo, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, goToPage, verifyCurrentPage, isOnLastPage, isOnFirstPage, navigateToAuditLogAndWaitForData, filterByActionAndVerify, filterByActorAndVerify, } from './audit-log-helpers';
26
- export { getCurrentTenantShowPaywall, creditBalanceTrigger, creditBalancePanel, creditBalancePlanBadge, expectCreditBalanceVisibilityForTenant, openCreditBalanceDropdown, waitForCreditBalanceLoaded, closeCreditBalanceDropdown, getCreditBalancePlanLabel, getCreditBalanceRemaining, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForTrialPlan, expectCreditBalancePanelForPremiumPlan, expectCreditBalanceForCurrentPlan, } from './credit-balance-helpers';
26
+ export { getCurrentTenantShowPaywall, creditBalanceTrigger, creditBalancePanel, creditBalancePlanBadge, expectCreditBalanceVisibilityForTenant, openCreditBalanceDropdown, waitForCreditBalanceLoaded, closeCreditBalanceDropdown, getCreditBalancePlanLabel, getCreditBalanceRemaining, expectCreditBalancePanelForStandardPlan, expectCreditBalancePanelForTrialPlan, expectCreditBalanceForCurrentPlan, openPlanPickerFromCreditBalance, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForPremiumPlan, } from './credit-balance-helpers';
27
27
  export type { CreditBalancePlan } from './credit-balance-helpers';
28
28
  export { PRIVACY_LABELS, isPrivacyTabVisible, switchToPrivacyTab, expectPrivacyFieldsHidden, expectPrivacyFieldsVisible, selectPrivacyAction, setBlockMessage, getEntityChip, setEntitySelected, expectEntitySelected, getOutputFilterSwitch, setOutputFilterEnabled, expectOutputFilterEnabled, } from './privacy-tab-helpers';
29
29
  export type { PrivacyAction, PrivacyEntity } from './privacy-tab-helpers';
@@ -35,7 +35,8 @@ export { SCREENSHARE_LABELS, isScreenShareTabVisible, switchToScreenShareTab, op
35
35
  export type { ScreenSharePromptField } from './screenshare-tab-helpers';
36
36
  export { graderTabBody, isGraderTabVisible, switchToGraderTab, switchToGraderSubTab, isGradingEnabled, setGradingEnabled, saveGraderConfig, addGraderCriterion, editGraderCriterion, deleteGraderCriterion, expectLastCriterionDeleteDisabled, expectGraderMisconfiguredWarning, expectGraderTotalPoints, filterGradeResultsByEmail, expectGradeResultRow, overrideGradeResult, clearGradeResultOverride, GRADER_LABELS, } from './grader-tab-helpers';
37
37
  export type { GraderCriterionInput, GraderGradingMode, GraderFeedbackMode, GraderSubTab, } from './grader-tab-helpers';
38
- export { billingPlanSection, billingCreditsSection, billingAutoRechargeSection, getBillingPlanLabel, getBillingAutoRechargeStatus, waitForBillingTabReady, expectBillingPlanSection, expectBillingCreditsSection, expectBillingAutoRechargeSection, expectBillingTabForFreePlan, expectBillingTabForTrialPlan, expectBillingTabForPremiumPlan, expectBillingTabForCurrentPlan, clickBillingUpgrade, clickBillingAddCredits, clickBillingManageBilling, clickBillingManageUsage, } from './billing-tab-helpers';
38
+ export { billingCreditsSection, billingAutoRechargeSection, getBillingPlanLabel, getBillingAutoRechargeStatus, waitForBillingTabReady, expectBillingCreditsSection, expectBillingAutoRechargeSection, expectBillingTabForStandardPlan, expectBillingTabForTrialPlan, expectBillingTabForCurrentPlan, clickBillingUpgrade, openPlanPickerFromBilling, clickBillingAddCredits, addCreditsDialog, submitAddCreditsAmount, clickBillingManageUsage, billingPlanSection, expectBillingPlanSection, expectBillingTabForFreePlan, expectBillingTabForPremiumPlan, clickBillingUpgradeToStandard, clickBillingManageBilling, } from './billing-tab-helpers';
39
+ export { planPickerDialog, planCard, waitForPlanPicker, getPlanPickerKeys, expectPlanPicker, choosePlan, closePlanPicker, } from './plan-picker-helpers';
39
40
  export type { BillingAutoRechargeStatus } from './billing-tab-helpers';
40
41
  export { SPEND_LIMITS_LABELS, spendLimitsTabBody, userSpendLimitRow, isSpendLimitsTabVisible, switchToSpendLimitsTab, switchToSpendLimitsSubTab, setAgentSpendLimit, deleteAgentSpendLimit, addUserSpendLimit, editUserSpendLimit, setUserSpendLimitEnabled, deleteUserSpendLimit, workspaceSpendLimitSection, switchToWorkspaceSpendLimits, switchToPlanAndCredits, setWorkspaceSpendLimit, deleteWorkspaceSpendLimit, expectWorkspaceSpendStats, expectWorkspaceActualSpendStats, agentLimitsSection, agentLimitsRow, switchToAgentLimits, filterAgentLimits, clearAgentLimitsFilter, openAgentLimitsManage, clickSetSpendLimitForFilteredAgent, closeAgentLimitsPopup, setAgentLimitsRowEnabled, expectAgentLimitsRowContent, createAgentSpendLimitViaFilter, setAgentSpendLimitFromTenantBilling, deleteAgentSpendLimitFromTenantBilling, addUserSpendLimitFromTenantBilling, userLimitsSection, userLimitsRow, newUserDefaultSection, switchToUserLimits, filterUserLimits, clearUserLimitsFilter, clickSetSpendLimitForFilteredUser, addTenantUserSpendLimit, editTenantUserSpendLimit, setUserLimitsRowEnabled, deleteTenantUserSpendLimit, expectUserLimitsRowContent, setNewUserSpendLimitDefault, expectNewUserSpendLimitDefault, } from './spend-limits-helpers';
41
42
  export type { SpendLimitSubTab, SpendLimitInterval, SpendLimitEnforcement, SpendLimitInput, UserSpendLimitInput, } from './spend-limits-helpers';
@@ -0,0 +1,26 @@
1
+ import { Locator, Page } from '@playwright/test';
2
+ /** The plan picker dialog a free-trial user gets from "Upgrade" (title "Choose Your Plan"). */
3
+ export declare function planPickerDialog(page: Page): Locator;
4
+ /** One plan card in the picker, by plan key (`free`, `premium`, `max`, `ultra`, ...). */
5
+ export declare function planCard(page: Page, planKey: string): Locator;
6
+ /**
7
+ * Waits until the picker is open and shows its plans. Fails here, not later,
8
+ * when the plans could not load ("Try again") or there are none.
9
+ */
10
+ export declare function waitForPlanPicker(page: Page): Promise<Locator>;
11
+ /** The plan keys the picker currently shows, in order. */
12
+ export declare function getPlanPickerKeys(page: Page): Promise<string[]>;
13
+ /**
14
+ * Asserts the picker shows the given plans (by key, in order) and that each
15
+ * card offers a "Choose <name>" button. `names` maps a key to the heading it
16
+ * must carry (Free, Pro, Max, Ultra by default for the known keys).
17
+ */
18
+ export declare function expectPlanPicker(page: Page, planKeys: string[], names?: Record<string, string>): Promise<void>;
19
+ /**
20
+ * Clicks the "Choose <name>" button of a plan and returns once the browser has
21
+ * left for Stripe (the URL no longer belongs to the app's origin). Pass the
22
+ * plan's key ("premium") or its heading ("Pro").
23
+ */
24
+ export declare function choosePlan(page: Page, planKeyOrName: string): Promise<string>;
25
+ /** Closes the plan picker with its Close button. */
26
+ export declare function closePlanPicker(page: Page): Promise<void>;
@@ -7,7 +7,7 @@ import { Locator, Page } from '@playwright/test';
7
7
  * "This Agent" / "Per User" sub-tabs, the per-user table with a
8
8
  * three-dots row menu, and the add/edit user-limit modal (email-based
9
9
  * user picker), and
10
- * - the **tenant settings Billing tab** with its "Plan & Credits" /
10
+ * - the **tenant settings Billing tab** with its "Credits" /
11
11
  * "Spend Limits" / "Agent Limits" / "User Limits" tabs: the workspace-wide
12
12
  * limit section (`SpendLimitsSection`), the agent caps table
13
13
  * (`AgentLimitsSection`), and the per-user caps across all agents plus the
@@ -42,7 +42,7 @@ export declare const SPEND_LIMITS_LABELS: {
42
42
  readonly users: "Per User";
43
43
  };
44
44
  readonly tenantTabs: {
45
- readonly planAndCredits: "Plan & Credits";
45
+ readonly planAndCredits: "Credits";
46
46
  readonly spendLimits: "Spend Limits";
47
47
  readonly agentLimits: "Agent Limits";
48
48
  readonly userLimits: "User Limits";
@@ -169,8 +169,9 @@ export declare function workspaceSpendLimitSection(page: Page): Locator;
169
169
  */
170
170
  export declare function switchToWorkspaceSpendLimits(page: Page): Promise<void>;
171
171
  /**
172
- * Switch the tenant Billing tab back to "Plan & Credits". Completion is
173
- * gated on the Plan section rendering.
172
+ * Switch the tenant Billing tab back to "Credits" (the first sub-tab, which
173
+ * used to be "Plan & Credits"). Completion is gated on the Credits section
174
+ * rendering.
174
175
  */
175
176
  export declare function switchToPlanAndCredits(page: Page): Promise<void>;
176
177
  /**