@iblai/iblai-js 2.72.0 → 2.73.1
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.
- package/dist/data-layer/playwright/billing-tab-helpers.d.ts +61 -48
- package/dist/data-layer/playwright/credit-balance-helpers.d.ts +40 -18
- package/dist/data-layer/playwright/index.d.ts +3 -2
- package/dist/data-layer/playwright/plan-picker-helpers.d.ts +26 -0
- package/dist/data-layer/playwright/spend-limits-helpers.d.ts +5 -4
- package/dist/playwright/index.cjs +306 -193
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +133 -71
- package/dist/playwright/index.esm.js +293 -194
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/billing-tab-helpers.d.ts +61 -48
- package/dist/playwright/playwright/credit-balance-helpers.d.ts +40 -18
- package/dist/playwright/playwright/index.d.ts +3 -2
- package/dist/playwright/playwright/plan-picker-helpers.d.ts +26 -0
- package/dist/playwright/playwright/spend-limits-helpers.d.ts +5 -4
- package/dist/security/playwright/billing-tab-helpers.d.ts +61 -48
- package/dist/security/playwright/credit-balance-helpers.d.ts +40 -18
- package/dist/security/playwright/index.d.ts +3 -2
- package/dist/security/playwright/plan-picker-helpers.d.ts +26 -0
- package/dist/security/playwright/spend-limits-helpers.d.ts +5 -4
- package/dist/web-containers/playwright/billing-tab-helpers.d.ts +61 -48
- package/dist/web-containers/playwright/credit-balance-helpers.d.ts +40 -18
- package/dist/web-containers/playwright/index.d.ts +3 -2
- package/dist/web-containers/playwright/plan-picker-helpers.d.ts +26 -0
- package/dist/web-containers/playwright/spend-limits-helpers.d.ts +5 -4
- package/dist/web-containers/source/add-credits-modal.js +170 -24
- package/dist/web-containers/source/add-credits-modal.js.map +1 -1
- package/dist/web-containers/source/auto-recharge-modal.js +1 -1
- package/dist/web-containers/source/auto-recharge-modal.js.map +1 -1
- package/dist/web-containers/source/billing-credits.js +4 -4
- package/dist/web-containers/source/billing-credits.js.map +1 -1
- package/dist/web-containers/source/billing.js +60 -101
- package/dist/web-containers/source/billing.js.map +1 -1
- package/dist/web-containers/source/components/credit-balance.js +44 -72
- package/dist/web-containers/source/components/credit-balance.js.map +1 -1
- package/dist/web-containers/source/components/modals/contact-admin-modal.js +32 -0
- package/dist/web-containers/source/components/modals/contact-admin-modal.js.map +1 -0
- package/dist/web-containers/source/components/modals/upgrade-package-modal.js +281 -20
- package/dist/web-containers/source/components/modals/upgrade-package-modal.js.map +1 -1
- package/dist/web-containers/source/components/profile/add-credits-modal.js +170 -24
- package/dist/web-containers/source/components/profile/add-credits-modal.js.map +1 -1
- package/dist/web-containers/source/components/profile/auto-recharge-modal.js +1 -1
- package/dist/web-containers/source/components/profile/auto-recharge-modal.js.map +1 -1
- package/dist/web-containers/source/components/profile/billing-credits.js +4 -4
- package/dist/web-containers/source/components/profile/billing-credits.js.map +1 -1
- package/dist/web-containers/source/components/profile/billing.js +60 -101
- package/dist/web-containers/source/components/profile/billing.js.map +1 -1
- package/dist/web-containers/source/components/profile/pending-credit-top-up.js +202 -0
- package/dist/web-containers/source/components/profile/pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/components/profile/use-complete-pending-credit-top-up.js +68 -0
- package/dist/web-containers/source/components/profile/use-complete-pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/components/subscription-top-banner.js +119 -0
- package/dist/web-containers/source/components/subscription-top-banner.js.map +1 -0
- package/dist/web-containers/source/components/workflows/workflow-editor.js +28 -8
- package/dist/web-containers/source/components/workflows/workflow-editor.js.map +1 -1
- package/dist/web-containers/source/contact-admin-modal.js +32 -0
- package/dist/web-containers/source/contact-admin-modal.js.map +1 -0
- package/dist/web-containers/source/credit-balance.js +44 -72
- package/dist/web-containers/source/credit-balance.js.map +1 -1
- package/dist/web-containers/source/en.json.js +121 -21
- package/dist/web-containers/source/en.json.js.map +1 -1
- package/dist/web-containers/source/es.json.js +123 -23
- package/dist/web-containers/source/es.json.js.map +1 -1
- package/dist/web-containers/source/fr.json.js +121 -21
- package/dist/web-containers/source/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/en.json.js +121 -21
- package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/es.json.js +123 -23
- package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/fr.json.js +121 -21
- package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/zh.json.js +122 -22
- package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/messages/en.json.js +121 -21
- package/dist/web-containers/source/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/messages/es.json.js +123 -23
- package/dist/web-containers/source/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/messages/fr.json.js +121 -21
- package/dist/web-containers/source/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/messages/zh.json.js +122 -22
- package/dist/web-containers/source/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/modals/contact-admin-modal.js +32 -0
- package/dist/web-containers/source/modals/contact-admin-modal.js.map +1 -0
- package/dist/web-containers/source/modals/upgrade-package-modal.js +281 -20
- package/dist/web-containers/source/modals/upgrade-package-modal.js.map +1 -1
- package/dist/web-containers/source/pending-credit-top-up.js +202 -0
- package/dist/web-containers/source/pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/profile/add-credits-modal.js +170 -24
- package/dist/web-containers/source/profile/add-credits-modal.js.map +1 -1
- package/dist/web-containers/source/profile/auto-recharge-modal.js +1 -1
- package/dist/web-containers/source/profile/auto-recharge-modal.js.map +1 -1
- package/dist/web-containers/source/profile/billing-credits.js +4 -4
- package/dist/web-containers/source/profile/billing-credits.js.map +1 -1
- package/dist/web-containers/source/profile/billing.js +60 -101
- package/dist/web-containers/source/profile/billing.js.map +1 -1
- package/dist/web-containers/source/profile/pending-credit-top-up.js +202 -0
- package/dist/web-containers/source/profile/pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/profile/use-complete-pending-credit-top-up.js +68 -0
- package/dist/web-containers/source/profile/use-complete-pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/subscription-top-banner.js +119 -0
- package/dist/web-containers/source/subscription-top-banner.js.map +1 -0
- package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/upgrade-package-modal.js +281 -20
- package/dist/web-containers/source/upgrade-package-modal.js.map +1 -1
- package/dist/web-containers/source/use-complete-pending-credit-top-up.js +68 -0
- package/dist/web-containers/source/use-complete-pending-credit-top-up.js.map +1 -0
- package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/workflow-editor.js +28 -8
- package/dist/web-containers/source/workflow-editor.js.map +1 -1
- package/dist/web-containers/source/workflows/workflow-editor.js +28 -8
- package/dist/web-containers/source/workflows/workflow-editor.js.map +1 -1
- package/dist/web-containers/source/zh.json.js +122 -22
- package/dist/web-containers/source/zh.json.js.map +1 -1
- package/dist/web-utils/playwright/billing-tab-helpers.d.ts +61 -48
- package/dist/web-utils/playwright/credit-balance-helpers.d.ts +40 -18
- package/dist/web-utils/playwright/index.d.ts +3 -2
- package/dist/web-utils/playwright/plan-picker-helpers.d.ts +26 -0
- package/dist/web-utils/playwright/spend-limits-helpers.d.ts +5 -4
- package/package.json +5 -5
|
@@ -3672,6 +3672,90 @@ async function filterByActorAndVerify(page, actorName) {
|
|
|
3672
3672
|
return count;
|
|
3673
3673
|
}
|
|
3674
3674
|
|
|
3675
|
+
const DEFAULT_TIMEOUT$2 = 15000;
|
|
3676
|
+
/** The plan picker dialog a free-trial user gets from "Upgrade" (title "Choose Your Plan"). */
|
|
3677
|
+
function planPickerDialog(page) {
|
|
3678
|
+
return page
|
|
3679
|
+
.getByRole('dialog')
|
|
3680
|
+
.filter({ has: page.getByRole('heading', { name: 'Choose Your Plan' }) });
|
|
3681
|
+
}
|
|
3682
|
+
/** One plan card in the picker, by plan key (`free`, `premium`, `max`, `ultra`, ...). */
|
|
3683
|
+
function planCard(page, planKey) {
|
|
3684
|
+
return planPickerDialog(page).getByTestId(`plan-card-${planKey}`);
|
|
3685
|
+
}
|
|
3686
|
+
/**
|
|
3687
|
+
* Waits until the picker is open and shows its plans. Fails here, not later,
|
|
3688
|
+
* when the plans could not load ("Try again") or there are none.
|
|
3689
|
+
*/
|
|
3690
|
+
async function waitForPlanPicker(page) {
|
|
3691
|
+
const dialog = planPickerDialog(page);
|
|
3692
|
+
await expect(dialog).toBeVisible({ timeout: DEFAULT_TIMEOUT$2 });
|
|
3693
|
+
await expect(dialog.locator('[aria-busy="true"]')).toHaveCount(0, { timeout: DEFAULT_TIMEOUT$2 });
|
|
3694
|
+
await expect(dialog.locator('[data-testid^="plan-card-"]').first()).toBeVisible({
|
|
3695
|
+
timeout: DEFAULT_TIMEOUT$2,
|
|
3696
|
+
});
|
|
3697
|
+
logger.info('Plan picker is open');
|
|
3698
|
+
return dialog;
|
|
3699
|
+
}
|
|
3700
|
+
/** The plan keys the picker currently shows, in order. */
|
|
3701
|
+
async function getPlanPickerKeys(page) {
|
|
3702
|
+
const cards = planPickerDialog(page).locator('[data-testid^="plan-card-"]');
|
|
3703
|
+
const ids = await cards.evaluateAll((els) => els.map((el) => el.getAttribute('data-testid') || ''));
|
|
3704
|
+
return ids.map((id) => id.replace(/^plan-card-/, ''));
|
|
3705
|
+
}
|
|
3706
|
+
/**
|
|
3707
|
+
* Asserts the picker shows the given plans (by key, in order) and that each
|
|
3708
|
+
* card offers a "Choose <name>" button. `names` maps a key to the heading it
|
|
3709
|
+
* must carry (Free, Pro, Max, Ultra by default for the known keys).
|
|
3710
|
+
*/
|
|
3711
|
+
async function expectPlanPicker(page, planKeys, names = { free: 'Free', premium: 'Pro', max: 'Max', ultra: 'Ultra' }) {
|
|
3712
|
+
await waitForPlanPicker(page);
|
|
3713
|
+
await expect.poll(() => getPlanPickerKeys(page)).toEqual(planKeys);
|
|
3714
|
+
for (const key of planKeys) {
|
|
3715
|
+
const card = planCard(page, key);
|
|
3716
|
+
const name = names[key];
|
|
3717
|
+
if (name) {
|
|
3718
|
+
await expect(card.getByRole('heading', { name, exact: true })).toBeVisible();
|
|
3719
|
+
await expect(card.getByRole('button', { name: `Choose ${name}` })).toBeVisible();
|
|
3720
|
+
}
|
|
3721
|
+
else {
|
|
3722
|
+
await expect(card.getByRole('button', { name: /^Choose / })).toBeVisible();
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
logger.info(`Verified plan picker with plans: ${planKeys.join(', ')}`);
|
|
3726
|
+
}
|
|
3727
|
+
/**
|
|
3728
|
+
* Clicks the "Choose <name>" button of a plan and returns once the browser has
|
|
3729
|
+
* left for Stripe (the URL no longer belongs to the app's origin). Pass the
|
|
3730
|
+
* plan's key ("premium") or its heading ("Pro").
|
|
3731
|
+
*/
|
|
3732
|
+
async function choosePlan(page, planKeyOrName) {
|
|
3733
|
+
const dialog = await waitForPlanPicker(page);
|
|
3734
|
+
const byKey = dialog.getByTestId(`plan-card-${planKeyOrName}`);
|
|
3735
|
+
const card = (await byKey.count()) > 0
|
|
3736
|
+
? byKey
|
|
3737
|
+
: dialog
|
|
3738
|
+
.locator('[data-testid^="plan-card-"]')
|
|
3739
|
+
.filter({ has: page.getByRole('heading', { name: planKeyOrName, exact: true }) });
|
|
3740
|
+
const button = card.getByRole('button', { name: /^Choose / });
|
|
3741
|
+
await expect(button).toBeVisible({ timeout: DEFAULT_TIMEOUT$2 });
|
|
3742
|
+
const appOrigin = new URL(page.url()).origin;
|
|
3743
|
+
await button.click();
|
|
3744
|
+
// Leaving the app is enough; Stripe's page need not finish loading.
|
|
3745
|
+
await page.waitForURL((url) => url.origin !== appOrigin, {
|
|
3746
|
+
timeout: 30000,
|
|
3747
|
+
waitUntil: 'commit',
|
|
3748
|
+
});
|
|
3749
|
+
logger.info(`Chose plan ${planKeyOrName}; now at ${page.url()}`);
|
|
3750
|
+
return page.url();
|
|
3751
|
+
}
|
|
3752
|
+
/** Closes the plan picker with its Close button. */
|
|
3753
|
+
async function closePlanPicker(page) {
|
|
3754
|
+
const dialog = planPickerDialog(page);
|
|
3755
|
+
await dialog.getByRole('button', { name: /close/i }).click();
|
|
3756
|
+
await expect(dialog).toHaveCount(0, { timeout: DEFAULT_TIMEOUT$2 });
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3675
3759
|
const DEFAULT_TIMEOUT$1 = 10000;
|
|
3676
3760
|
/**
|
|
3677
3761
|
* Reads `current_tenant` from localStorage and returns its `show_paywall` flag.
|
|
@@ -3699,7 +3783,7 @@ function creditBalanceTrigger(page) {
|
|
|
3699
3783
|
function creditBalancePanel(page) {
|
|
3700
3784
|
return page.getByTestId('credit-balance-panel');
|
|
3701
3785
|
}
|
|
3702
|
-
/** Locator for the plan badge (Free
|
|
3786
|
+
/** Locator for the plan badge (Trial, Free or the plan's name) inside the open panel. */
|
|
3703
3787
|
function creditBalancePlanBadge(page) {
|
|
3704
3788
|
return creditBalancePanel(page).getByTestId('credit-balance-plan-badge');
|
|
3705
3789
|
}
|
|
@@ -3728,9 +3812,11 @@ async function expectCreditBalanceVisibilityForTenant(page) {
|
|
|
3728
3812
|
*/
|
|
3729
3813
|
async function openCreditBalanceDropdown(page) {
|
|
3730
3814
|
const panel = creditBalancePanel(page);
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3815
|
+
const trigger = creditBalanceTrigger(page);
|
|
3816
|
+
await expect(trigger).toBeVisible({ timeout: DEFAULT_TIMEOUT$1 });
|
|
3817
|
+
// The trigger's state flips at once, while a closing panel can still be
|
|
3818
|
+
// visible for a moment.
|
|
3819
|
+
if ((await trigger.getAttribute('aria-expanded')) !== 'true') {
|
|
3734
3820
|
await trigger.click();
|
|
3735
3821
|
}
|
|
3736
3822
|
await expect(panel).toBeVisible({ timeout: DEFAULT_TIMEOUT$1 });
|
|
@@ -3753,98 +3839,99 @@ async function closeCreditBalanceDropdown(page) {
|
|
|
3753
3839
|
await expect(creditBalancePanel(page)).toHaveCount(0);
|
|
3754
3840
|
}
|
|
3755
3841
|
/**
|
|
3756
|
-
* Reads the
|
|
3757
|
-
*
|
|
3842
|
+
* Reads the billing state from the open panel's badge: `'Trial'` on the free
|
|
3843
|
+
* trial, `'Free'` for an account on any plan (the badge then shows "Free" or
|
|
3844
|
+
* the plan's name). Returns null if the badge is not rendered (e.g. billing
|
|
3845
|
+
* data still loading or errored).
|
|
3758
3846
|
*/
|
|
3759
3847
|
async function getCreditBalancePlanLabel(page) {
|
|
3760
3848
|
const badge = creditBalancePlanBadge(page);
|
|
3761
3849
|
if ((await badge.count()) === 0)
|
|
3762
3850
|
return null;
|
|
3763
|
-
|
|
3764
|
-
if (text === 'Free' || text === 'Trial' || text === 'Premium')
|
|
3765
|
-
return text;
|
|
3766
|
-
return null;
|
|
3851
|
+
return (await badge.innerText()).trim() === 'Trial' ? 'Trial' : 'Free';
|
|
3767
3852
|
}
|
|
3768
3853
|
/**
|
|
3769
3854
|
* Reads the "Remaining" credits value from the open panel ("X,XXX Credits").
|
|
3770
|
-
* Returns null when the row is not rendered or unparseable.
|
|
3855
|
+
* Returns null when the row is not rendered or unparseable. The panel shows
|
|
3856
|
+
* cached data while it refetches, so after a top-up read it through
|
|
3857
|
+
* `expect.poll(() => getCreditBalanceRemaining(page))`.
|
|
3771
3858
|
*/
|
|
3772
3859
|
async function getCreditBalanceRemaining(page) {
|
|
3773
|
-
const
|
|
3774
|
-
|
|
3775
|
-
if ((await row.count()) === 0)
|
|
3860
|
+
const value = creditBalancePanel(page).getByTestId('credit-balance-remaining');
|
|
3861
|
+
if ((await value.count()) === 0)
|
|
3776
3862
|
return null;
|
|
3777
|
-
const text = await
|
|
3863
|
+
const text = await value.innerText().catch(() => '');
|
|
3778
3864
|
const match = text.match(/([0-9][0-9,]*)\s*Credits/i);
|
|
3779
3865
|
if (!match)
|
|
3780
3866
|
return null;
|
|
3781
3867
|
return parseInt(match[1].replace(/,/g, ''), 10);
|
|
3782
3868
|
}
|
|
3783
|
-
function panelButtons(panel
|
|
3869
|
+
function panelButtons(panel) {
|
|
3784
3870
|
return {
|
|
3785
|
-
|
|
3871
|
+
upgrade: panel.getByRole('button', { name: /^Upgrade$/ }),
|
|
3786
3872
|
manageUsage: panel.getByRole('button', { name: /^Manage Usage$/ }),
|
|
3787
3873
|
addCredits: panel.getByRole('button', { name: /^Add Credits$/ }),
|
|
3788
|
-
manageBilling: panel.getByRole('button', { name: /^Manage Billing$/ }),
|
|
3789
3874
|
autoRechargeHeading: panel.getByText(/^Auto Recharge$/),
|
|
3790
3875
|
};
|
|
3791
3876
|
}
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3877
|
+
async function expectStandardPlanButtons(btn, options) {
|
|
3878
|
+
await expect(btn.upgrade).toHaveCount(0);
|
|
3879
|
+
await expect(btn.addCredits).toBeVisible();
|
|
3880
|
+
if ((options === null || options === void 0 ? void 0 : options.hasPaymentMethod) === true) {
|
|
3881
|
+
await expect(btn.autoRechargeHeading).toBeVisible();
|
|
3882
|
+
await expect(btn.manageUsage).toBeVisible();
|
|
3883
|
+
}
|
|
3884
|
+
else if ((options === null || options === void 0 ? void 0 : options.hasPaymentMethod) === false) {
|
|
3885
|
+
await expect(btn.autoRechargeHeading).toHaveCount(0);
|
|
3886
|
+
await expect(btn.manageUsage).toHaveCount(0);
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
async function expectTrialButtons(btn) {
|
|
3890
|
+
await expect(btn.upgrade).toBeVisible();
|
|
3799
3891
|
await expect(btn.autoRechargeHeading).toHaveCount(0);
|
|
3800
|
-
await expect(btn.upgradePlan).toBeVisible();
|
|
3801
3892
|
await expect(btn.manageUsage).toHaveCount(0);
|
|
3802
3893
|
await expect(btn.addCredits).toHaveCount(0);
|
|
3803
|
-
await expect(btn.manageBilling).toHaveCount(0);
|
|
3804
|
-
logger.info('Verified credit balance panel for Free plan');
|
|
3805
3894
|
}
|
|
3806
3895
|
/**
|
|
3807
|
-
*
|
|
3896
|
+
* UI for an account on a plan: never an "Upgrade" button; "Add Credits" always.
|
|
3897
|
+
* - With a payment method: Manage Usage + Add Credits and the Auto Recharge section.
|
|
3898
|
+
* - Without one: Add Credits alone (the dialog collects a card on Stripe first),
|
|
3899
|
+
* no Manage Usage, no Auto Recharge section.
|
|
3900
|
+
* - `hasPaymentMethod` omitted: only the badge, Add Credits and the absence of
|
|
3901
|
+
* Upgrade are checked.
|
|
3902
|
+
* - `planName`: the exact badge text ("Free", "Max"); omitted, any plan but
|
|
3903
|
+
* the trial passes.
|
|
3808
3904
|
*/
|
|
3809
|
-
async function
|
|
3905
|
+
async function expectCreditBalancePanelForStandardPlan(page, options) {
|
|
3810
3906
|
const panel = await openCreditBalanceDropdown(page);
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3907
|
+
const badge = creditBalancePlanBadge(page);
|
|
3908
|
+
if (options === null || options === void 0 ? void 0 : options.planName) {
|
|
3909
|
+
await expect(badge).toHaveText(options.planName);
|
|
3910
|
+
}
|
|
3911
|
+
else {
|
|
3912
|
+
await expect(badge).toBeVisible();
|
|
3913
|
+
await expect(badge).not.toHaveText('Trial');
|
|
3914
|
+
}
|
|
3915
|
+
await expectStandardPlanButtons(panelButtons(panel), options);
|
|
3916
|
+
logger.info(`Verified credit balance panel for Free plan (hasPaymentMethod=${options === null || options === void 0 ? void 0 : options.hasPaymentMethod})`);
|
|
3818
3917
|
}
|
|
3819
3918
|
/**
|
|
3820
|
-
*
|
|
3821
|
-
*
|
|
3822
|
-
* - Without payment method: Manage Billing visible; Manage Usage + Add Credits hidden.
|
|
3919
|
+
* Trial UI: "Upgrade" only (it opens the plan picker). No Manage Usage /
|
|
3920
|
+
* Add Credits, and no Auto Recharge section.
|
|
3823
3921
|
*/
|
|
3824
|
-
async function
|
|
3922
|
+
async function expectCreditBalancePanelForTrialPlan(page) {
|
|
3825
3923
|
const panel = await openCreditBalanceDropdown(page);
|
|
3826
|
-
await expect(creditBalancePlanBadge(page)).toHaveText('
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
if (options.hasPaymentMethod) {
|
|
3830
|
-
await expect(btn.manageUsage).toBeVisible();
|
|
3831
|
-
await expect(btn.addCredits).toBeVisible();
|
|
3832
|
-
await expect(btn.manageBilling).toHaveCount(0);
|
|
3833
|
-
}
|
|
3834
|
-
else {
|
|
3835
|
-
await expect(btn.manageBilling).toBeVisible();
|
|
3836
|
-
await expect(btn.manageUsage).toHaveCount(0);
|
|
3837
|
-
await expect(btn.addCredits).toHaveCount(0);
|
|
3838
|
-
}
|
|
3839
|
-
logger.info(`Verified credit balance panel for Premium plan (hasPaymentMethod=${options.hasPaymentMethod})`);
|
|
3924
|
+
await expect(creditBalancePlanBadge(page)).toHaveText('Trial');
|
|
3925
|
+
await expectTrialButtons(panelButtons(panel));
|
|
3926
|
+
logger.info('Verified credit balance panel for Trial plan');
|
|
3840
3927
|
}
|
|
3841
3928
|
/**
|
|
3842
3929
|
* Convenience: opens the dropdown, detects the active plan from the badge,
|
|
3843
3930
|
* and runs the matching state assertions on the already-open panel. Returns
|
|
3844
3931
|
* the detected plan label.
|
|
3845
3932
|
*
|
|
3846
|
-
*
|
|
3847
|
-
* sub-state; if omitted
|
|
3933
|
+
* On the Free plan you may pass `hasPaymentMethod` to assert the specific
|
|
3934
|
+
* sub-state; if omitted, only the absence of "Upgrade" is checked.
|
|
3848
3935
|
*/
|
|
3849
3936
|
async function expectCreditBalanceForCurrentPlan(page, options) {
|
|
3850
3937
|
const panel = await openCreditBalanceDropdown(page);
|
|
@@ -3853,36 +3940,32 @@ async function expectCreditBalanceForCurrentPlan(page, options) {
|
|
|
3853
3940
|
throw new Error('Credit balance plan badge was not found in the dropdown panel');
|
|
3854
3941
|
}
|
|
3855
3942
|
const btn = panelButtons(panel);
|
|
3856
|
-
if (plan === '
|
|
3857
|
-
await
|
|
3858
|
-
await expect(btn.upgradePlan).toBeVisible();
|
|
3859
|
-
await expect(btn.manageUsage).toHaveCount(0);
|
|
3860
|
-
await expect(btn.addCredits).toHaveCount(0);
|
|
3861
|
-
await expect(btn.manageBilling).toHaveCount(0);
|
|
3862
|
-
}
|
|
3863
|
-
else if (plan === 'Trial') {
|
|
3864
|
-
await expect(btn.upgradePlan).toBeVisible();
|
|
3865
|
-
await expect(btn.manageUsage).toHaveCount(0);
|
|
3866
|
-
await expect(btn.addCredits).toHaveCount(0);
|
|
3867
|
-
await expect(btn.manageBilling).toHaveCount(0);
|
|
3943
|
+
if (plan === 'Trial') {
|
|
3944
|
+
await expectTrialButtons(btn);
|
|
3868
3945
|
}
|
|
3869
3946
|
else {
|
|
3870
|
-
|
|
3871
|
-
await expect(btn.upgradePlan).toHaveCount(0);
|
|
3872
|
-
if ((options === null || options === void 0 ? void 0 : options.hasPaymentMethod) === true) {
|
|
3873
|
-
await expect(btn.manageUsage).toBeVisible();
|
|
3874
|
-
await expect(btn.addCredits).toBeVisible();
|
|
3875
|
-
await expect(btn.manageBilling).toHaveCount(0);
|
|
3876
|
-
}
|
|
3877
|
-
else if ((options === null || options === void 0 ? void 0 : options.hasPaymentMethod) === false) {
|
|
3878
|
-
await expect(btn.manageBilling).toBeVisible();
|
|
3879
|
-
await expect(btn.manageUsage).toHaveCount(0);
|
|
3880
|
-
await expect(btn.addCredits).toHaveCount(0);
|
|
3881
|
-
}
|
|
3947
|
+
await expectStandardPlanButtons(btn, options);
|
|
3882
3948
|
}
|
|
3883
3949
|
logger.info(`Verified credit balance UI for plan="${plan}"`);
|
|
3884
3950
|
return plan;
|
|
3885
3951
|
}
|
|
3952
|
+
/**
|
|
3953
|
+
* Clicks "Upgrade" in the credit balance dropdown (free trial only) and waits
|
|
3954
|
+
* for the plan picker to show its plans.
|
|
3955
|
+
*/
|
|
3956
|
+
async function openPlanPickerFromCreditBalance(page) {
|
|
3957
|
+
const panel = await openCreditBalanceDropdown(page);
|
|
3958
|
+
const btn = panelButtons(panel).upgrade;
|
|
3959
|
+
await expect(btn).toBeVisible();
|
|
3960
|
+
await btn.click();
|
|
3961
|
+
return waitForPlanPicker(page);
|
|
3962
|
+
}
|
|
3963
|
+
// Names from before the credits-only revamp, kept so existing suites still
|
|
3964
|
+
// import. Each points at the helper that covers the same state today.
|
|
3965
|
+
/** @deprecated The Free plan is now the free trial; use `expectCreditBalancePanelForTrialPlan`. */
|
|
3966
|
+
const expectCreditBalancePanelForFreePlan = expectCreditBalancePanelForTrialPlan;
|
|
3967
|
+
/** @deprecated The Premium plan is now the Free plan; use `expectCreditBalancePanelForStandardPlan`. */
|
|
3968
|
+
const expectCreditBalancePanelForPremiumPlan = expectCreditBalancePanelForStandardPlan;
|
|
3886
3969
|
|
|
3887
3970
|
/**
|
|
3888
3971
|
* Best-effort switch to the Edit Agent modal's category pill (Setup /
|
|
@@ -5352,29 +5435,28 @@ async function clearGradeResultOverride(page, email) {
|
|
|
5352
5435
|
}
|
|
5353
5436
|
|
|
5354
5437
|
const DEFAULT_TIMEOUT = 10000;
|
|
5355
|
-
/** Locator for the
|
|
5356
|
-
function billingPlanSection(page) {
|
|
5357
|
-
return page.getByTestId('billing-plan-section');
|
|
5358
|
-
}
|
|
5359
|
-
/** Locator for the Credits section card on the BillingTab. */
|
|
5438
|
+
/** Locator for the Credits section card on the BillingTab (there is no Plan card). */
|
|
5360
5439
|
function billingCreditsSection(page) {
|
|
5361
5440
|
return page.getByTestId('billing-credits-section');
|
|
5362
5441
|
}
|
|
5363
5442
|
/** Locator for the Auto Recharge section card on the BillingTab.
|
|
5364
|
-
*
|
|
5443
|
+
* Rendered whenever a payment method is on file (never on the free trial).
|
|
5365
5444
|
*/
|
|
5366
5445
|
function billingAutoRechargeSection(page) {
|
|
5367
5446
|
return page.getByTestId('billing-auto-recharge-section');
|
|
5368
5447
|
}
|
|
5369
|
-
|
|
5448
|
+
function billingUpgradeButton(page) {
|
|
5449
|
+
return billingCreditsSection(page).getByRole('button', { name: /^Upgrade$/ });
|
|
5450
|
+
}
|
|
5451
|
+
/**
|
|
5452
|
+
* Detects the billing state from the Credits section: "Trial" when it offers
|
|
5453
|
+
* "Upgrade" (the plan picker), "Free" otherwise. Returns null while the
|
|
5454
|
+
* section is not rendered (loading skeletons).
|
|
5455
|
+
*/
|
|
5370
5456
|
async function getBillingPlanLabel(page) {
|
|
5371
|
-
|
|
5372
|
-
if ((await label.count()) === 0)
|
|
5457
|
+
if ((await billingCreditsSection(page).count()) === 0)
|
|
5373
5458
|
return null;
|
|
5374
|
-
|
|
5375
|
-
if (text === 'Free' || text === 'Trial' || text === 'Premium')
|
|
5376
|
-
return text;
|
|
5377
|
-
return null;
|
|
5459
|
+
return (await billingUpgradeButton(page).count()) > 0 ? 'Trial' : 'Free';
|
|
5378
5460
|
}
|
|
5379
5461
|
/** Reads the auto-recharge status badge (Enabled / Disabled) when the section is rendered. */
|
|
5380
5462
|
async function getBillingAutoRechargeStatus(page) {
|
|
@@ -5386,62 +5468,39 @@ async function getBillingAutoRechargeStatus(page) {
|
|
|
5386
5468
|
return text;
|
|
5387
5469
|
return null;
|
|
5388
5470
|
}
|
|
5389
|
-
/** Waits for the BillingTab loading skeletons to clear by waiting for the
|
|
5390
|
-
* section card to mount. */
|
|
5471
|
+
/** Waits for the BillingTab loading skeletons to clear by waiting for the
|
|
5472
|
+
* Credits section card to mount. */
|
|
5391
5473
|
async function waitForBillingTabReady(page) {
|
|
5392
|
-
await expect(
|
|
5393
|
-
}
|
|
5394
|
-
/**
|
|
5395
|
-
* Asserts the Plan section state for a given plan. Verifies:
|
|
5396
|
-
* - The plan label text matches `options.plan`
|
|
5397
|
-
* - The "Current" pill is visible
|
|
5398
|
-
* - The Upgrade button is visible iff the plan is not Premium
|
|
5399
|
-
*/
|
|
5400
|
-
async function expectBillingPlanSection(page, options) {
|
|
5401
|
-
const section = billingPlanSection(page);
|
|
5402
|
-
await expect(section).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5403
|
-
await expect(section.getByTestId('billing-plan-label')).toHaveText(options.plan);
|
|
5404
|
-
await expect(section.getByText(/^Current$/)).toBeVisible();
|
|
5405
|
-
const upgradeBtn = section.getByRole('button', { name: /^Upgrade$/ });
|
|
5406
|
-
if (options.plan === 'Premium') {
|
|
5407
|
-
await expect(upgradeBtn).toHaveCount(0);
|
|
5408
|
-
}
|
|
5409
|
-
else {
|
|
5410
|
-
await expect(upgradeBtn).toBeVisible();
|
|
5411
|
-
}
|
|
5474
|
+
await expect(billingCreditsSection(page)).toBeVisible({ timeout: 15000 });
|
|
5412
5475
|
}
|
|
5413
5476
|
/**
|
|
5414
5477
|
* Asserts the Credits section state. Always verifies the "Available" stat row.
|
|
5415
5478
|
* The action button rule mirrors the component:
|
|
5416
|
-
* -
|
|
5417
|
-
* -
|
|
5418
|
-
*
|
|
5419
|
-
*
|
|
5479
|
+
* - Trial → "Upgrade" visible; no Add Credits
|
|
5480
|
+
* - Free → "Add Credits" visible whether or not a card is on file (the
|
|
5481
|
+
* dialog collects one on Stripe first when there is none); never
|
|
5482
|
+
* "Upgrade". `hasPaymentMethod` only matters to the Auto
|
|
5483
|
+
* Recharge section (see `expectBillingAutoRechargeSection`).
|
|
5420
5484
|
*/
|
|
5421
5485
|
async function expectBillingCreditsSection(page, options) {
|
|
5422
5486
|
const section = billingCreditsSection(page);
|
|
5423
5487
|
await expect(section).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5424
5488
|
await expect(section.getByText(/^Available$/)).toBeVisible();
|
|
5489
|
+
const upgradeBtn = billingUpgradeButton(page);
|
|
5425
5490
|
const addCreditsBtn = section.getByRole('button', { name: /^Add Credits$/ });
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
await expect(addCreditsBtn).toHaveCount(0);
|
|
5429
|
-
await expect(manageBillingBtn).toHaveCount(0);
|
|
5430
|
-
}
|
|
5431
|
-
else if (options.hasPaymentMethod === true) {
|
|
5432
|
-
await expect(addCreditsBtn).toBeVisible();
|
|
5433
|
-
await expect(manageBillingBtn).toHaveCount(0);
|
|
5434
|
-
}
|
|
5435
|
-
else if (options.hasPaymentMethod === false) {
|
|
5436
|
-
await expect(manageBillingBtn).toBeVisible();
|
|
5491
|
+
if (options.plan === 'Trial') {
|
|
5492
|
+
await expect(upgradeBtn).toBeVisible();
|
|
5437
5493
|
await expect(addCreditsBtn).toHaveCount(0);
|
|
5494
|
+
return;
|
|
5438
5495
|
}
|
|
5496
|
+
await expect(upgradeBtn).toHaveCount(0);
|
|
5497
|
+
await expect(addCreditsBtn).toBeVisible();
|
|
5439
5498
|
}
|
|
5440
5499
|
/**
|
|
5441
|
-
* Asserts the Auto Recharge section visibility.
|
|
5442
|
-
*
|
|
5443
|
-
* to assert the section is absent. When visible and
|
|
5444
|
-
* asserts the Enabled/Disabled badge text.
|
|
5500
|
+
* Asserts the Auto Recharge section visibility. The component renders it when
|
|
5501
|
+
* a payment method is on file and the account is not on the free trial. Pass
|
|
5502
|
+
* `expectVisible: false` to assert the section is absent. When visible and
|
|
5503
|
+
* `status` is provided, also asserts the Enabled/Disabled badge text.
|
|
5445
5504
|
*/
|
|
5446
5505
|
async function expectBillingAutoRechargeSection(page, options) {
|
|
5447
5506
|
const section = billingAutoRechargeSection(page);
|
|
@@ -5456,88 +5515,110 @@ async function expectBillingAutoRechargeSection(page, options) {
|
|
|
5456
5515
|
}
|
|
5457
5516
|
}
|
|
5458
5517
|
/**
|
|
5459
|
-
* Free plan:
|
|
5460
|
-
*
|
|
5461
|
-
|
|
5462
|
-
async function expectBillingTabForFreePlan(page) {
|
|
5463
|
-
await expectBillingPlanSection(page, { plan: 'Free' });
|
|
5464
|
-
await expectBillingCreditsSection(page, { plan: 'Free' });
|
|
5465
|
-
await expectBillingAutoRechargeSection(page, { expectVisible: false });
|
|
5466
|
-
logger.info('Verified billing tab for Free plan');
|
|
5467
|
-
}
|
|
5468
|
-
/**
|
|
5469
|
-
* Trial plan: Plan="Trial" with Upgrade visible; Credits action depends on
|
|
5470
|
-
* `hasPaymentMethod` (Add Credits when true, Manage Billing when false);
|
|
5471
|
-
* Auto Recharge section is rendered iff `hasPaymentMethod` is true.
|
|
5518
|
+
* Free plan: no "Upgrade", "Add Credits" always; the Auto Recharge section
|
|
5519
|
+
* follows `hasPaymentMethod` (shown when true, absent when false). With
|
|
5520
|
+
* `hasPaymentMethod` omitted only the Credits card is verified.
|
|
5472
5521
|
*/
|
|
5473
|
-
async function
|
|
5474
|
-
await expectBillingPlanSection(page, { plan: 'Trial' });
|
|
5522
|
+
async function expectBillingTabForStandardPlan(page, options) {
|
|
5475
5523
|
await expectBillingCreditsSection(page, {
|
|
5476
|
-
plan: '
|
|
5477
|
-
hasPaymentMethod: options.hasPaymentMethod,
|
|
5524
|
+
plan: 'Free',
|
|
5525
|
+
hasPaymentMethod: options === null || options === void 0 ? void 0 : options.hasPaymentMethod,
|
|
5478
5526
|
});
|
|
5479
|
-
|
|
5480
|
-
|
|
5527
|
+
if ((options === null || options === void 0 ? void 0 : options.hasPaymentMethod) !== undefined) {
|
|
5528
|
+
await expectBillingAutoRechargeSection(page, { expectVisible: options.hasPaymentMethod });
|
|
5529
|
+
}
|
|
5530
|
+
logger.info(`Verified billing tab for Free plan (hasPaymentMethod=${options === null || options === void 0 ? void 0 : options.hasPaymentMethod})`);
|
|
5481
5531
|
}
|
|
5482
5532
|
/**
|
|
5483
|
-
*
|
|
5484
|
-
*
|
|
5485
|
-
* Auto Recharge section is rendered iff `hasPaymentMethod` is true.
|
|
5533
|
+
* Trial: "Upgrade" (opens the plan picker) is the only Credits action and the
|
|
5534
|
+
* Auto Recharge section is hidden entirely (regardless of has_payment_method).
|
|
5486
5535
|
*/
|
|
5487
|
-
async function
|
|
5488
|
-
await
|
|
5489
|
-
await
|
|
5490
|
-
|
|
5491
|
-
hasPaymentMethod: options.hasPaymentMethod,
|
|
5492
|
-
});
|
|
5493
|
-
await expectBillingAutoRechargeSection(page, { expectVisible: options.hasPaymentMethod });
|
|
5494
|
-
logger.info(`Verified billing tab for Premium plan (hasPaymentMethod=${options.hasPaymentMethod})`);
|
|
5536
|
+
async function expectBillingTabForTrialPlan(page) {
|
|
5537
|
+
await expectBillingCreditsSection(page, { plan: 'Trial' });
|
|
5538
|
+
await expectBillingAutoRechargeSection(page, { expectVisible: false });
|
|
5539
|
+
logger.info('Verified billing tab for Trial plan');
|
|
5495
5540
|
}
|
|
5496
5541
|
/**
|
|
5497
|
-
* Convenience: detects the
|
|
5498
|
-
* the matching
|
|
5542
|
+
* Convenience: detects the billing state from the Credits section and runs
|
|
5543
|
+
* the matching assertions. Returns the detected plan.
|
|
5499
5544
|
*
|
|
5500
|
-
*
|
|
5501
|
-
* sub-states; if omitted, only the
|
|
5545
|
+
* On the Free plan, pass `hasPaymentMethod` to assert the Credits/Auto Recharge
|
|
5546
|
+
* sub-states; if omitted, only the base Credits row is verified.
|
|
5502
5547
|
*/
|
|
5503
5548
|
async function expectBillingTabForCurrentPlan(page, options) {
|
|
5504
5549
|
await waitForBillingTabReady(page);
|
|
5505
5550
|
const plan = await getBillingPlanLabel(page);
|
|
5506
5551
|
if (!plan) {
|
|
5507
|
-
throw new Error('Could not detect
|
|
5508
|
-
}
|
|
5509
|
-
if (plan === 'Free') {
|
|
5510
|
-
await expectBillingTabForFreePlan(page);
|
|
5552
|
+
throw new Error('Could not detect the billing state from the BillingTab Credits section');
|
|
5511
5553
|
}
|
|
5512
|
-
|
|
5513
|
-
await expectBillingTabForTrialPlan(page
|
|
5514
|
-
hasPaymentMethod: Boolean(options === null || options === void 0 ? void 0 : options.hasPaymentMethod),
|
|
5515
|
-
});
|
|
5554
|
+
if (plan === 'Trial') {
|
|
5555
|
+
await expectBillingTabForTrialPlan(page);
|
|
5516
5556
|
}
|
|
5517
5557
|
else {
|
|
5518
|
-
await
|
|
5519
|
-
hasPaymentMethod: Boolean(options === null || options === void 0 ? void 0 : options.hasPaymentMethod),
|
|
5520
|
-
});
|
|
5558
|
+
await expectBillingTabForStandardPlan(page, options);
|
|
5521
5559
|
}
|
|
5522
5560
|
return plan;
|
|
5523
5561
|
}
|
|
5524
|
-
/** Clicks the Upgrade button in the
|
|
5562
|
+
/** Clicks the Upgrade button in the Credits section (free trial only); it opens the plan picker. */
|
|
5525
5563
|
async function clickBillingUpgrade(page) {
|
|
5526
|
-
const btn =
|
|
5564
|
+
const btn = billingUpgradeButton(page);
|
|
5527
5565
|
await expect(btn).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5528
5566
|
await btn.click();
|
|
5529
5567
|
}
|
|
5530
|
-
/** Clicks the
|
|
5568
|
+
/** Clicks Upgrade in the Credits section and waits for the plan picker to show its plans. */
|
|
5569
|
+
async function openPlanPickerFromBilling(page) {
|
|
5570
|
+
await clickBillingUpgrade(page);
|
|
5571
|
+
return waitForPlanPicker(page);
|
|
5572
|
+
}
|
|
5573
|
+
/** Clicks the Add Credits button in the Credits section (Free plan, with or without a card). */
|
|
5531
5574
|
async function clickBillingAddCredits(page) {
|
|
5532
5575
|
const btn = billingCreditsSection(page).getByRole('button', { name: /^Add Credits$/ });
|
|
5533
5576
|
await expect(btn).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5534
5577
|
await btn.click();
|
|
5535
5578
|
}
|
|
5536
|
-
/**
|
|
5537
|
-
|
|
5538
|
-
|
|
5579
|
+
/** Locator for the Add Credits dialog (opened from the Billing tab or the credit dropdown). */
|
|
5580
|
+
function addCreditsDialog(page) {
|
|
5581
|
+
return page.getByRole('dialog', { name: /^Add Credits$/ });
|
|
5582
|
+
}
|
|
5583
|
+
/**
|
|
5584
|
+
* Types a USD amount into the open Add Credits dialog and submits it. With a
|
|
5585
|
+
* payment method on file the submit button reads "Add Credits" and the charge
|
|
5586
|
+
* runs at once; without one it reads "Continue" and the page navigates to the
|
|
5587
|
+
* Stripe customer portal to save a card (the charge runs when Stripe returns
|
|
5588
|
+
* to the app). Returns once that finished (the dialog closed after the
|
|
5589
|
+
* charge, or the browser left for Stripe), with which of the two buttons was
|
|
5590
|
+
* pressed. A refused charge keeps the dialog open, so this then times out.
|
|
5591
|
+
*/
|
|
5592
|
+
async function submitAddCreditsAmount(page, amountUsd) {
|
|
5593
|
+
const dialog = addCreditsDialog(page);
|
|
5594
|
+
await expect(dialog).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5595
|
+
// $20 / $50 / $100 are boxes; any other amount goes through the "Other
|
|
5596
|
+
// amount" link, which reveals the "Amount (USD)" field.
|
|
5597
|
+
const preset = dialog.getByRole('button', { name: `$${amountUsd}`, exact: true });
|
|
5598
|
+
if ((await preset.count()) > 0) {
|
|
5599
|
+
await preset.click();
|
|
5600
|
+
}
|
|
5601
|
+
else {
|
|
5602
|
+
await dialog.getByRole('button', { name: /^Other amount$/ }).click();
|
|
5603
|
+
await dialog.getByLabel(/^Amount \(USD\)$/).fill(String(amountUsd));
|
|
5604
|
+
}
|
|
5605
|
+
const addCredits = dialog.getByRole('button', { name: /^Add Credits$/ });
|
|
5606
|
+
const label = (await addCredits.count()) > 0 ? 'Add Credits' : 'Continue';
|
|
5607
|
+
const btn = label === 'Add Credits' ? addCredits : dialog.getByRole('button', { name: /^Continue$/ });
|
|
5539
5608
|
await expect(btn).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5609
|
+
const appOrigin = new URL(page.url()).origin;
|
|
5540
5610
|
await btn.click();
|
|
5611
|
+
if (label === 'Add Credits') {
|
|
5612
|
+
// The dialog closes only once the charge went through.
|
|
5613
|
+
await expect(dialog).toBeHidden({ timeout: 30000 });
|
|
5614
|
+
}
|
|
5615
|
+
else {
|
|
5616
|
+
await page.waitForURL((url) => url.origin !== appOrigin, {
|
|
5617
|
+
timeout: 30000,
|
|
5618
|
+
waitUntil: 'commit',
|
|
5619
|
+
});
|
|
5620
|
+
}
|
|
5621
|
+
return label;
|
|
5541
5622
|
}
|
|
5542
5623
|
/** Clicks the Manage Usage button in the Auto Recharge section. */
|
|
5543
5624
|
async function clickBillingManageUsage(page) {
|
|
@@ -5545,6 +5626,23 @@ async function clickBillingManageUsage(page) {
|
|
|
5545
5626
|
await expect(btn).toBeVisible({ timeout: DEFAULT_TIMEOUT });
|
|
5546
5627
|
await btn.click();
|
|
5547
5628
|
}
|
|
5629
|
+
// Names from before the credits-only revamp, kept so existing suites still
|
|
5630
|
+
// import. Each points at the helper that covers the same step today.
|
|
5631
|
+
/** @deprecated There is no Plan card any more; use `billingCreditsSection`. */
|
|
5632
|
+
const billingPlanSection = billingCreditsSection;
|
|
5633
|
+
/** @deprecated The plan now shows in the Credits card; use `expectBillingCreditsSection`. */
|
|
5634
|
+
const expectBillingPlanSection = expectBillingCreditsSection;
|
|
5635
|
+
/** @deprecated The Free plan is now the free trial; use `expectBillingTabForTrialPlan`. */
|
|
5636
|
+
const expectBillingTabForFreePlan = expectBillingTabForTrialPlan;
|
|
5637
|
+
/** @deprecated The Premium plan is now the Free plan; use `expectBillingTabForStandardPlan`. */
|
|
5638
|
+
const expectBillingTabForPremiumPlan = expectBillingTabForStandardPlan;
|
|
5639
|
+
/** @deprecated The trial button reads "Upgrade" and opens the plan picker; use `clickBillingUpgrade`. */
|
|
5640
|
+
const clickBillingUpgradeToStandard = clickBillingUpgrade;
|
|
5641
|
+
/**
|
|
5642
|
+
* @deprecated Manage Billing is gone; Add Credits collects a card when none is on file. Use
|
|
5643
|
+
* `clickBillingAddCredits`. Note it opens the Add Credits dialog and no longer leaves for Stripe.
|
|
5644
|
+
*/
|
|
5645
|
+
const clickBillingManageBilling = clickBillingAddCredits;
|
|
5548
5646
|
|
|
5549
5647
|
/**
|
|
5550
5648
|
* Spend limits ("Billing") helpers — Playwright bindings for the LLM
|
|
@@ -5554,7 +5652,7 @@ async function clickBillingManageUsage(page) {
|
|
|
5554
5652
|
* "This Agent" / "Per User" sub-tabs, the per-user table with a
|
|
5555
5653
|
* three-dots row menu, and the add/edit user-limit modal (email-based
|
|
5556
5654
|
* user picker), and
|
|
5557
|
-
* - the **tenant settings Billing tab** with its "
|
|
5655
|
+
* - the **tenant settings Billing tab** with its "Credits" /
|
|
5558
5656
|
* "Spend Limits" / "Agent Limits" / "User Limits" tabs: the workspace-wide
|
|
5559
5657
|
* limit section (`SpendLimitsSection`), the agent caps table
|
|
5560
5658
|
* (`AgentLimitsSection`), and the per-user caps across all agents plus the
|
|
@@ -5589,7 +5687,7 @@ const SPEND_LIMITS_LABELS = {
|
|
|
5589
5687
|
users: 'Per User',
|
|
5590
5688
|
},
|
|
5591
5689
|
tenantTabs: {
|
|
5592
|
-
planAndCredits: '
|
|
5690
|
+
planAndCredits: 'Credits',
|
|
5593
5691
|
spendLimits: 'Spend Limits',
|
|
5594
5692
|
agentLimits: 'Agent Limits',
|
|
5595
5693
|
userLimits: 'User Limits',
|
|
@@ -5919,7 +6017,7 @@ async function deleteUserSpendLimit(page, username, scope) {
|
|
|
5919
6017
|
logger.info(`Deleted user spend limit for "${username}"`);
|
|
5920
6018
|
}
|
|
5921
6019
|
// ---------------------------------------------------------------------------
|
|
5922
|
-
// Tenant settings — Billing tab ("
|
|
6020
|
+
// Tenant settings — Billing tab ("Credits" / "Spend Limits")
|
|
5923
6021
|
// ---------------------------------------------------------------------------
|
|
5924
6022
|
/** The tenant Billing tab's tablist (scoped by its aria-label). */
|
|
5925
6023
|
function tenantBillingTablist(page) {
|
|
@@ -5945,8 +6043,9 @@ async function switchToWorkspaceSpendLimits(page) {
|
|
|
5945
6043
|
logger.info('Switched to tenant Spend Limits tab');
|
|
5946
6044
|
}
|
|
5947
6045
|
/**
|
|
5948
|
-
* Switch the tenant Billing tab back to "
|
|
5949
|
-
* gated on the
|
|
6046
|
+
* Switch the tenant Billing tab back to "Credits" (the first sub-tab, which
|
|
6047
|
+
* used to be "Plan & Credits"). Completion is gated on the Credits section
|
|
6048
|
+
* rendering.
|
|
5950
6049
|
*/
|
|
5951
6050
|
async function switchToPlanAndCredits(page) {
|
|
5952
6051
|
const tab = tenantBillingTablist(page).getByRole('tab', {
|
|
@@ -5955,8 +6054,8 @@ async function switchToPlanAndCredits(page) {
|
|
|
5955
6054
|
});
|
|
5956
6055
|
await expect(tab).toBeVisible({ timeout: UI_TIMEOUT });
|
|
5957
6056
|
await tab.click();
|
|
5958
|
-
await expect(page.getByTestId('billing-
|
|
5959
|
-
logger.info('Switched to tenant
|
|
6057
|
+
await expect(page.getByTestId('billing-credits-section')).toBeVisible({ timeout: UI_TIMEOUT });
|
|
6058
|
+
logger.info('Switched to tenant Credits tab');
|
|
5960
6059
|
}
|
|
5961
6060
|
/**
|
|
5962
6061
|
* Create or update the workspace-wide spend limit (switches to the Spend
|
|
@@ -9037,5 +9136,5 @@ function createPlaywrightConfig(options) {
|
|
|
9037
9136
|
});
|
|
9038
9137
|
}
|
|
9039
9138
|
|
|
9040
|
-
export { AuthFlowBuilder, CHAT_PRIVACY_LABELS, CustomReporter, EVALS_LABELS, GRADER_LABELS, HISTORY_TAB_LABELS, LTI_LABELS, LTI_TEST_IDS, MEMORY_ADMIN_LABELS, MailsacClient, PRIVACY_LABELS, SCREENSHARE_LABELS, SPEND_LIMITS_LABELS, SUPPORT_LABELS, TASKS_LABELS, VOICE_LABELS, addAgentMemoryFromPopup, addGraderCriterion, addManualScore, addMemory, addQaPairsManually, addSkillToAgent, addTenantUserSpendLimit, addTextResource, addUserGlobalMemory, addUserSpendLimit, addUserSpendLimitFromTenantBilling, agentLimitsRow, agentLimitsSection, applyVoiceInstructionsPreset, archiveFirstMemory, archiveMemoryByContent, billingAutoRechargeSection, billingCreditsSection, billingPlanSection, buildReportUrl, canChatWithEmbedMentor, cancelDeleteEvaluation, cancelDeleteInstance, cancelDeleteSkill, cancelDisconnectInstance, cancelEnableChatPrivacyMidSession, cancelKeyDelete, cancelLlmJudge, cancelNewInstanceDialog, cancelStartEvaluation, checkAdminStatus, checkRunStatus, clearAgentLimitsFilter, clearAgentMemoriesFilter, clearDateRangeFilter, clearGradeResultOverride, clearHistoryAgentFilter, clearInstanceSearch, clearUserFilter, clearUserLimitsFilter, clickBackHome, clickBillingAddCredits, clickBillingManageBilling, clickBillingManageUsage, clickBillingUpgrade, clickChatPrivacyToggle, clickDownloadAgain, clickManualDownloadLink, clickSetSpendLimitForFilteredAgent, clickSetSpendLimitForFilteredUser, closeAgentLimitsPopup, closeAgentMemoriesPopup, closeBenchmarkItemsDialog, closeCreditBalanceDropdown, closeEvaluationDetailDialog, closeKeyDetail, closeManageBenchmarksDialog, closeUserMemoriesPopup, closeWithEsc, confirmEnableChatPrivacyMidSession, confirmKeyDelete, connectToInstance, copyEndpoint, createAgentSpendLimitViaFilter, createAuthSetup, createBenchmark, createEnvConfig, createInstance, createKey, createLink, createPlaywrightConfig, createSkill, createSupportTicketViaChatAndVerify, createTool, creditBalancePanel, creditBalancePlanBadge, creditBalanceTrigger, deleteAgentSpendLimit, deleteAgentSpendLimitFromTenantBilling, deleteEvaluation, deleteFirstMemory, deleteGraderCriterion, deleteInstance, deleteKey, deleteMemoryByContent, deleteQaItem, deleteResource, deleteSkill, deleteTask, deleteTenantUserSpendLimit, deleteUserGlobalMemory, deleteUserSpendLimit, deleteWorkspaceSpendLimit, disableSkill, disableSupport, disconnectInstance, downloadConversationCsv, downloadExportedReport, editAgentPrompt, editGraderCriterion, editInstance, editLink, editSkill, editTenantUserSpendLimit, editTextResource, editTool, editUserGlobalMemory, editUserSpendLimit, enableSkill, enableSupport, expandReview, expandTrace, expectAgentLimitsRowContent, expectAllEndpointsVisible, expectBenchmarkListed, expectBillingAutoRechargeSection, expectBillingCreditsSection, expectBillingPlanSection, expectBillingTabForCurrentPlan, expectBillingTabForFreePlan, expectBillingTabForPremiumPlan, expectBillingTabForTrialPlan, expectCallConfigVisible, expectCallConfigVoiceTriggerShows, expectChatPrivacyConfirmDialogOpen, expectChatPrivacyLocked, expectChatPrivacySource, expectChatPrivacyState, expectChatPrivacyToggleVisible, expectCompletedTasks, expectCreditBalanceForCurrentPlan, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForPremiumPlan, expectCreditBalancePanelForTrialPlan, expectCreditBalanceVisibilityForTenant, expectDetailWaitingForTraces, expectEndpointUrl, expectEntitySelected, expectFailedTasks, expectGradeResultRow, expectGraderMisconfiguredWarning, expectGraderTotalPoints, expectKeyDeleteError, expectKeyInList, expectKeyNotInList, expectKeysEmpty, expectLastCriterionDeleteDisabled, expectLinkInList, expectLinkNotInList, expectLinkStatus, expectLinkTargetUri, expectLinksEmpty, expectLogDetailsStatus, expectLogsForTask, expectLtiHeader, expectMentorVoiceTriggerShows, expectMessageInConversation, expectNewUserSpendLimitDefault, expectNoAccessibilityViolations, expectNoAccessibilityViolationsOnDialogs, expectNoBenchmarksNotice, expectNoLogsForSelectedTask, expectNoRepliesYet, expectNoTickets, expectOutputFilterEnabled, expectPrivacyFieldsHidden, expectPrivacyFieldsVisible, expectPrivateModeSelected, expectPrivateModeTabReady, expectQaItemListed, expectReviewInList, expectReviewStatus, expectRunInTable, expectRunNotInTable, expectRunStatus, expectRunsTableEmpty, expectScheduleStartTimeInPastError, expectScreenShareDisabledHint, expectSelectedBenchmark, expectSttSelectDisabled, expectTaskInList, expectTaskNotInList, expectTaskStatus, expectTasksEmpty, expectTenantChatPrivacyEnabled, expectTenantChatPrivacyVisible, expectTicketClosedNotice, expectTicketDescriptionContains, expectTicketInList, expectTicketStatusInList, expectToolInList, expectToolNotInList, expectToolsEmpty, expectTotalTasks, expectTraceScore, expectTtsSelectDisabled, expectUserLimitsRowContent, expectVoiceInstructionsValue, expectVoiceProviderSelected, expectVoiceVisible, expectWorkspaceActualSpendStats, expectWorkspaceSpendStats, exportHistoryAndWaitForDownload, exportRunCsv, fillLinkName, fillToolForm, filterAgentLimits, filterAgentMemories, filterByAction, filterByActionAndVerify, filterByActor, filterByActorAndVerify, filterByDateRange, filterGradeResultsByEmail, filterHistoryByAgent, filterHistoryBySentiment, filterHistoryByTopic, filterTicketsByStatus, filterTicketsByUser, filterUserLimits, generateBrowserSetupProjects, generateProjectConfig, getAddItemsDialog, getAuditLogRowCount, getAvailableActors, getBenchmarkCombobox, getBenchmarkComboboxDropdown, getBenchmarkItemsDialog, getBillingAutoRechargeStatus, getBillingPlanLabel, getBrowserKey, getCallConfigForm, getChatInput, getChatPrivacyConfirmDialog, getChatPrivacyToggle, getConversationList, getConversationPreview, getConversationRows, getCreateBenchmarkDialog, getCreateKeyButton, getCreateLinkButton, getCreateToolButton, getCreditBalancePlanLabel, getCreditBalanceRemaining, getCurrentModel, getCurrentTenantShowPaywall, getDeleteEvaluationDialog, getDeleteQaItemDialog, getEditAgentDialog, getEndpoint, getEndpointCopyButton, getEndpointUrl, getEntityChip, getEvaluationDetailDialog, getExportRowsByState, getExportsTable, getInstanceHealthLabel, getInstanceRowCount, getInstanceStatusLabel, getKeyActionsTrigger, getKeyCreateModal, getKeyCreateNameInput, getKeyDeleteModal, getKeyDetailModal, getKeyDetailNameInput, getKeyPublicJwkField, getKeyPublicKeyField, getKeyRow, getKeysEmptyState, getKeysSection, getLinkCopyTargetUriButton, getLinkEditButton, getLinkModal, getLinkNameInput, getLinkRow, getLinksEmptyState, getLinksRefreshButton, getLinksSection, getLlmJudgeDialog, getLlmPickerDialog, getLtiSubTab, getManageBenchmarksButton, getManageBenchmarksDialog, getMemoryCount, getMentorIdFromUrl, getNewEvaluationButton, getOutputFilterSwitch, getPaginationInfo, getPrivateModeCard, getProfileDialog, getReplyComposer, getReviewRow, getRunRow, getScheduleTaskButton, getSearchInput, getSkillRowCount, getStartEvaluationDialog, getStatusFilter, getSupportInfoBox, getSupportTabTrigger, getSupportToggle, getTaskRow, getTenantChatPrivacyRow, getTenantChatPrivacySwitch, getTicketDescription, getTicketDetail, getTicketList, getTicketRow, getTicketRowByIndex, getToolEditButton, getToolKeySelect, getToolModal, getToolRow, getToolsEmptyState, getToolsSection, getTraceRow, getUserFilter, getVoiceProviderCard, getVoiceRow, goToFirstPage, goToLastPage, goToNextPage, goToPage, goToPreviousPage, goToSkillsListPage, graderTabBody, inviteUserTest, isEvaluationTabVisible, isFirefox, isGraderTabVisible, isGradingEnabled, isJSON, isLtiTabVisible, isMemoryTabVisible, isOnFirstPage, isOnLastPage, isPrivacyTabVisible, isPrivateModeTabVisible, isSandboxKindEnabled, isSandboxTabVisible, isScreenShareTabVisible, isSkillEnabled, isSpendLimitsTabVisible, isSupportEnabled, isSupportTabVisible, isTasksTabVisible, isTenantMemoryTabVisible, isVoiceTabVisible, logger, loginWithEmailAndPassword, loginWithMicrosoftIdp, memoryAdminAgentRow, memoryAdminAgentSection, memoryAdminGlobalSection, memoryAdminUserRow, memoryRowByContent, navigateToAccountComponent, navigateToAuditLog, navigateToAuditLogAndWaitForData, navigateToDataReports, navigateToReportDownload, newUserDefaultSection, openAddItemsDialog, openAddMemoryDialog, openAgentLimitsManage, openAgentMemoriesPopup, openAgentPromptEditModal, openBenchmarkItems, openCallConfigVoicePicker, openCreateKeyModal, openCreateLinkModal, openCreateToolModal, openCreditBalanceDropdown, openEditInstanceDialog, openEditLinkModal, openEditSkillDialog, openEditToolModal, openFirstLogDetails, openHistoryTab, openInstanceActionsMenu, openKeyActionsMenu, openKeyDelete, openKeyDetail, openLLMProviderPicker, openManageBenchmarksDialog, openMentorVoicePicker, openNewInstanceDialog, openNewReviewForRun, openNewReviewFromDetail, openNewSkillDialog, openRunActionsMenu, openRunResults, openScheduleTaskDialog, openScreenSharePromptEditor, openSkillActionsMenu, openSlashSkillPicker, openStartEvaluationDialog, openTicket, openUserMemoriesPopup, openVoiceInstructionsEditor, overrideGradeResult, parseReportUrlParams, previewCallConfigVoiceInline, previewMentorVoiceInline, previewVoice, pushConfiguration, readEndpointUrl, readKeyPublicJwk, readKeyPublicKey, refreshEvaluationDetail, refreshLinks, refreshTickets, reliableClick, reliableFill, removeSkillFromAgent, removeTraceScore, renameKey, replyToTicket, requestSupportTicketViaChat, resetCallConfig, retry, retryFailedLink, runConnectedInstanceChecks, runInstanceChecks, safeWaitForURL, saveCallConfig, saveGraderConfig, saveScreenSharePrompts, saveVoiceSettings, scheduleTask, searchBenchmarks, searchInstances, searchMemoryAdminUsers, searchTasks, searchVoices, selectBenchmark, selectCallMode, selectConversation, selectDateFromCalendar, selectJudgeLlm, selectLLMModel, selectLlmProvider, selectPrivacyAction, selectPrivateMode, selectSlashSkill, selectSttProvider, selectTaskInList, selectToolKeySetMode, selectToolSigningKey, selectTtsProvider, selectVoice, selectVoiceProvider, sendAgentChatMessage, setAgentLimitsRowEnabled, setAgentSpendLimit, setAgentSpendLimitFromTenantBilling, setBlockMessage, setCallLanguage, setCatalogSkillEnabled, setEnableVideo, setEntitySelected, setGradingEnabled, setNewUserSpendLimitDefault, setOutputFilterEnabled, setScreenSharePrompt, setSupportEnabled, setTenantChatPrivacyEnabled, setTicketStatus, setUseFunctionCallingEnabled, setUserLimitsRowEnabled, setUserSpendLimitEnabled, setVoiceInstructions, setWorkspaceSpendLimit, setupSandboxInstance, shouldAddNewRowWhenClickingAddRowButton, shouldAllowEditingCellValuesInCSVEditor, shouldCancelCombiningReports, shouldCloseCSVEditorWhenClickingCloseButton, shouldCloseCSVEditorWithoutSavingWhenClickingCancel, shouldCombineRecommendationReports, shouldDirectlyDownloadChatHistoryReportWithoutCSVEditor, shouldDisableOtherDownloadButtonsWhileGeneratingReport, shouldDisplayCSVInEditableTableFormat, shouldDisplayReportCards, shouldHaveCombinedReportDataTestIds, shouldOpenCSVEditorDialog, shouldOpenCSVEditorForUserMetadataReport, shouldSaveEditedCSVAndTriggerDownload, shouldShowCombiningReportsDialog, shouldVerifyCSVEditorDialogAccessibility, signUpWithEmailAndPassword, spendLimitsTabBody, startEvaluation, startHistoryExport, submitLinkModal, submitLlmJudge, submitToolModal, switchHistorySubTab, switchToAddItemsSubTab, switchToAgentLimits, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, switchToEvaluationTab, switchToGraderSubTab, switchToGraderTab, switchToLtiSubTab, switchToLtiTab, switchToMemoryAdminSubTab, switchToMemoryTab, switchToPlanAndCredits, switchToPrivacyTab, switchToPrivateModeTab, switchToSandboxTab, switchToScreenShareTab, switchToSkillResourcesSubTab, switchToSkillsTab, switchToSpendLimitsSubTab, switchToSpendLimitsTab, switchToSupportTab, switchToTasksTab, switchToTenantMemoryTab, switchToUserLimits, switchToVoiceSubTab, switchToVoiceTab, switchToWorkspaceSpendLimits, teardownSandboxInstance, test, toggleAutoPush, toggleMemorySwitch, toggleSandboxKind, toggleSkill, toggleUserMemoryAdminSetting, toolFields, turnOffChatPrivacyMidSession, uploadAssetResource, uploadQaCsv, userLimitsRow, userLimitsSection, userSpendLimitRow, verifyAgentConfigPromptsVisible, verifyAgentSkillsEmptyState, verifyAuditLogEmptyState, verifyAuditLogEntryStructure, verifyAuditLogGenericError, verifyAuditLogLoading, verifyAuditLogPermissionError, verifyAuditLogTableVisible, verifyClawSectionHidden, verifyClawSectionVisible, verifyConnectDisabledForUnhealthy, verifyConnectedInstanceCard, verifyCurrentPage, verifyDonePhase, verifyDownloadingPhase, verifyErrorPhase, verifyInstanceTableEmpty, verifyInstanceTableVisible, verifyMemoryExists, verifyMemoryNotExists, verifyMemoryTabMemoriesList, verifyMemoryTabSettings, verifyPreparingPhase, verifySandboxKindsVisible, verifySkillAdded, verifySkillVisible, verifySkillsEmptyState, verifySkillsTabVisible, waitForAgentChatResponse, waitForAuditLogDataLoaded, waitForBillingTabReady, waitForCompletedExportRow, waitForConversations, waitForCreditBalanceLoaded, waitForDialogReady, waitForElementStable, waitForLinkReady, waitForPageLoad, waitForPageReady, waitForReportDownload, waitForTicketInList, workspaceSpendLimitSection };
|
|
9139
|
+
export { AuthFlowBuilder, CHAT_PRIVACY_LABELS, CustomReporter, EVALS_LABELS, GRADER_LABELS, HISTORY_TAB_LABELS, LTI_LABELS, LTI_TEST_IDS, MEMORY_ADMIN_LABELS, MailsacClient, PRIVACY_LABELS, SCREENSHARE_LABELS, SPEND_LIMITS_LABELS, SUPPORT_LABELS, TASKS_LABELS, VOICE_LABELS, addAgentMemoryFromPopup, addCreditsDialog, addGraderCriterion, addManualScore, addMemory, addQaPairsManually, addSkillToAgent, addTenantUserSpendLimit, addTextResource, addUserGlobalMemory, addUserSpendLimit, addUserSpendLimitFromTenantBilling, agentLimitsRow, agentLimitsSection, applyVoiceInstructionsPreset, archiveFirstMemory, archiveMemoryByContent, billingAutoRechargeSection, billingCreditsSection, billingPlanSection, buildReportUrl, canChatWithEmbedMentor, cancelDeleteEvaluation, cancelDeleteInstance, cancelDeleteSkill, cancelDisconnectInstance, cancelEnableChatPrivacyMidSession, cancelKeyDelete, cancelLlmJudge, cancelNewInstanceDialog, cancelStartEvaluation, checkAdminStatus, checkRunStatus, choosePlan, clearAgentLimitsFilter, clearAgentMemoriesFilter, clearDateRangeFilter, clearGradeResultOverride, clearHistoryAgentFilter, clearInstanceSearch, clearUserFilter, clearUserLimitsFilter, clickBackHome, clickBillingAddCredits, clickBillingManageBilling, clickBillingManageUsage, clickBillingUpgrade, clickBillingUpgradeToStandard, clickChatPrivacyToggle, clickDownloadAgain, clickManualDownloadLink, clickSetSpendLimitForFilteredAgent, clickSetSpendLimitForFilteredUser, closeAgentLimitsPopup, closeAgentMemoriesPopup, closeBenchmarkItemsDialog, closeCreditBalanceDropdown, closeEvaluationDetailDialog, closeKeyDetail, closeManageBenchmarksDialog, closePlanPicker, closeUserMemoriesPopup, closeWithEsc, confirmEnableChatPrivacyMidSession, confirmKeyDelete, connectToInstance, copyEndpoint, createAgentSpendLimitViaFilter, createAuthSetup, createBenchmark, createEnvConfig, createInstance, createKey, createLink, createPlaywrightConfig, createSkill, createSupportTicketViaChatAndVerify, createTool, creditBalancePanel, creditBalancePlanBadge, creditBalanceTrigger, deleteAgentSpendLimit, deleteAgentSpendLimitFromTenantBilling, deleteEvaluation, deleteFirstMemory, deleteGraderCriterion, deleteInstance, deleteKey, deleteMemoryByContent, deleteQaItem, deleteResource, deleteSkill, deleteTask, deleteTenantUserSpendLimit, deleteUserGlobalMemory, deleteUserSpendLimit, deleteWorkspaceSpendLimit, disableSkill, disableSupport, disconnectInstance, downloadConversationCsv, downloadExportedReport, editAgentPrompt, editGraderCriterion, editInstance, editLink, editSkill, editTenantUserSpendLimit, editTextResource, editTool, editUserGlobalMemory, editUserSpendLimit, enableSkill, enableSupport, expandReview, expandTrace, expectAgentLimitsRowContent, expectAllEndpointsVisible, expectBenchmarkListed, expectBillingAutoRechargeSection, expectBillingCreditsSection, expectBillingPlanSection, expectBillingTabForCurrentPlan, expectBillingTabForFreePlan, expectBillingTabForPremiumPlan, expectBillingTabForStandardPlan, expectBillingTabForTrialPlan, expectCallConfigVisible, expectCallConfigVoiceTriggerShows, expectChatPrivacyConfirmDialogOpen, expectChatPrivacyLocked, expectChatPrivacySource, expectChatPrivacyState, expectChatPrivacyToggleVisible, expectCompletedTasks, expectCreditBalanceForCurrentPlan, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForPremiumPlan, expectCreditBalancePanelForStandardPlan, expectCreditBalancePanelForTrialPlan, expectCreditBalanceVisibilityForTenant, expectDetailWaitingForTraces, expectEndpointUrl, expectEntitySelected, expectFailedTasks, expectGradeResultRow, expectGraderMisconfiguredWarning, expectGraderTotalPoints, expectKeyDeleteError, expectKeyInList, expectKeyNotInList, expectKeysEmpty, expectLastCriterionDeleteDisabled, expectLinkInList, expectLinkNotInList, expectLinkStatus, expectLinkTargetUri, expectLinksEmpty, expectLogDetailsStatus, expectLogsForTask, expectLtiHeader, expectMentorVoiceTriggerShows, expectMessageInConversation, expectNewUserSpendLimitDefault, expectNoAccessibilityViolations, expectNoAccessibilityViolationsOnDialogs, expectNoBenchmarksNotice, expectNoLogsForSelectedTask, expectNoRepliesYet, expectNoTickets, expectOutputFilterEnabled, expectPlanPicker, expectPrivacyFieldsHidden, expectPrivacyFieldsVisible, expectPrivateModeSelected, expectPrivateModeTabReady, expectQaItemListed, expectReviewInList, expectReviewStatus, expectRunInTable, expectRunNotInTable, expectRunStatus, expectRunsTableEmpty, expectScheduleStartTimeInPastError, expectScreenShareDisabledHint, expectSelectedBenchmark, expectSttSelectDisabled, expectTaskInList, expectTaskNotInList, expectTaskStatus, expectTasksEmpty, expectTenantChatPrivacyEnabled, expectTenantChatPrivacyVisible, expectTicketClosedNotice, expectTicketDescriptionContains, expectTicketInList, expectTicketStatusInList, expectToolInList, expectToolNotInList, expectToolsEmpty, expectTotalTasks, expectTraceScore, expectTtsSelectDisabled, expectUserLimitsRowContent, expectVoiceInstructionsValue, expectVoiceProviderSelected, expectVoiceVisible, expectWorkspaceActualSpendStats, expectWorkspaceSpendStats, exportHistoryAndWaitForDownload, exportRunCsv, fillLinkName, fillToolForm, filterAgentLimits, filterAgentMemories, filterByAction, filterByActionAndVerify, filterByActor, filterByActorAndVerify, filterByDateRange, filterGradeResultsByEmail, filterHistoryByAgent, filterHistoryBySentiment, filterHistoryByTopic, filterTicketsByStatus, filterTicketsByUser, filterUserLimits, generateBrowserSetupProjects, generateProjectConfig, getAddItemsDialog, getAuditLogRowCount, getAvailableActors, getBenchmarkCombobox, getBenchmarkComboboxDropdown, getBenchmarkItemsDialog, getBillingAutoRechargeStatus, getBillingPlanLabel, getBrowserKey, getCallConfigForm, getChatInput, getChatPrivacyConfirmDialog, getChatPrivacyToggle, getConversationList, getConversationPreview, getConversationRows, getCreateBenchmarkDialog, getCreateKeyButton, getCreateLinkButton, getCreateToolButton, getCreditBalancePlanLabel, getCreditBalanceRemaining, getCurrentModel, getCurrentTenantShowPaywall, getDeleteEvaluationDialog, getDeleteQaItemDialog, getEditAgentDialog, getEndpoint, getEndpointCopyButton, getEndpointUrl, getEntityChip, getEvaluationDetailDialog, getExportRowsByState, getExportsTable, getInstanceHealthLabel, getInstanceRowCount, getInstanceStatusLabel, getKeyActionsTrigger, getKeyCreateModal, getKeyCreateNameInput, getKeyDeleteModal, getKeyDetailModal, getKeyDetailNameInput, getKeyPublicJwkField, getKeyPublicKeyField, getKeyRow, getKeysEmptyState, getKeysSection, getLinkCopyTargetUriButton, getLinkEditButton, getLinkModal, getLinkNameInput, getLinkRow, getLinksEmptyState, getLinksRefreshButton, getLinksSection, getLlmJudgeDialog, getLlmPickerDialog, getLtiSubTab, getManageBenchmarksButton, getManageBenchmarksDialog, getMemoryCount, getMentorIdFromUrl, getNewEvaluationButton, getOutputFilterSwitch, getPaginationInfo, getPlanPickerKeys, getPrivateModeCard, getProfileDialog, getReplyComposer, getReviewRow, getRunRow, getScheduleTaskButton, getSearchInput, getSkillRowCount, getStartEvaluationDialog, getStatusFilter, getSupportInfoBox, getSupportTabTrigger, getSupportToggle, getTaskRow, getTenantChatPrivacyRow, getTenantChatPrivacySwitch, getTicketDescription, getTicketDetail, getTicketList, getTicketRow, getTicketRowByIndex, getToolEditButton, getToolKeySelect, getToolModal, getToolRow, getToolsEmptyState, getToolsSection, getTraceRow, getUserFilter, getVoiceProviderCard, getVoiceRow, goToFirstPage, goToLastPage, goToNextPage, goToPage, goToPreviousPage, goToSkillsListPage, graderTabBody, inviteUserTest, isEvaluationTabVisible, isFirefox, isGraderTabVisible, isGradingEnabled, isJSON, isLtiTabVisible, isMemoryTabVisible, isOnFirstPage, isOnLastPage, isPrivacyTabVisible, isPrivateModeTabVisible, isSandboxKindEnabled, isSandboxTabVisible, isScreenShareTabVisible, isSkillEnabled, isSpendLimitsTabVisible, isSupportEnabled, isSupportTabVisible, isTasksTabVisible, isTenantMemoryTabVisible, isVoiceTabVisible, logger, loginWithEmailAndPassword, loginWithMicrosoftIdp, memoryAdminAgentRow, memoryAdminAgentSection, memoryAdminGlobalSection, memoryAdminUserRow, memoryRowByContent, navigateToAccountComponent, navigateToAuditLog, navigateToAuditLogAndWaitForData, navigateToDataReports, navigateToReportDownload, newUserDefaultSection, openAddItemsDialog, openAddMemoryDialog, openAgentLimitsManage, openAgentMemoriesPopup, openAgentPromptEditModal, openBenchmarkItems, openCallConfigVoicePicker, openCreateKeyModal, openCreateLinkModal, openCreateToolModal, openCreditBalanceDropdown, openEditInstanceDialog, openEditLinkModal, openEditSkillDialog, openEditToolModal, openFirstLogDetails, openHistoryTab, openInstanceActionsMenu, openKeyActionsMenu, openKeyDelete, openKeyDetail, openLLMProviderPicker, openManageBenchmarksDialog, openMentorVoicePicker, openNewInstanceDialog, openNewReviewForRun, openNewReviewFromDetail, openNewSkillDialog, openPlanPickerFromBilling, openPlanPickerFromCreditBalance, openRunActionsMenu, openRunResults, openScheduleTaskDialog, openScreenSharePromptEditor, openSkillActionsMenu, openSlashSkillPicker, openStartEvaluationDialog, openTicket, openUserMemoriesPopup, openVoiceInstructionsEditor, overrideGradeResult, parseReportUrlParams, planCard, planPickerDialog, previewCallConfigVoiceInline, previewMentorVoiceInline, previewVoice, pushConfiguration, readEndpointUrl, readKeyPublicJwk, readKeyPublicKey, refreshEvaluationDetail, refreshLinks, refreshTickets, reliableClick, reliableFill, removeSkillFromAgent, removeTraceScore, renameKey, replyToTicket, requestSupportTicketViaChat, resetCallConfig, retry, retryFailedLink, runConnectedInstanceChecks, runInstanceChecks, safeWaitForURL, saveCallConfig, saveGraderConfig, saveScreenSharePrompts, saveVoiceSettings, scheduleTask, searchBenchmarks, searchInstances, searchMemoryAdminUsers, searchTasks, searchVoices, selectBenchmark, selectCallMode, selectConversation, selectDateFromCalendar, selectJudgeLlm, selectLLMModel, selectLlmProvider, selectPrivacyAction, selectPrivateMode, selectSlashSkill, selectSttProvider, selectTaskInList, selectToolKeySetMode, selectToolSigningKey, selectTtsProvider, selectVoice, selectVoiceProvider, sendAgentChatMessage, setAgentLimitsRowEnabled, setAgentSpendLimit, setAgentSpendLimitFromTenantBilling, setBlockMessage, setCallLanguage, setCatalogSkillEnabled, setEnableVideo, setEntitySelected, setGradingEnabled, setNewUserSpendLimitDefault, setOutputFilterEnabled, setScreenSharePrompt, setSupportEnabled, setTenantChatPrivacyEnabled, setTicketStatus, setUseFunctionCallingEnabled, setUserLimitsRowEnabled, setUserSpendLimitEnabled, setVoiceInstructions, setWorkspaceSpendLimit, setupSandboxInstance, shouldAddNewRowWhenClickingAddRowButton, shouldAllowEditingCellValuesInCSVEditor, shouldCancelCombiningReports, shouldCloseCSVEditorWhenClickingCloseButton, shouldCloseCSVEditorWithoutSavingWhenClickingCancel, shouldCombineRecommendationReports, shouldDirectlyDownloadChatHistoryReportWithoutCSVEditor, shouldDisableOtherDownloadButtonsWhileGeneratingReport, shouldDisplayCSVInEditableTableFormat, shouldDisplayReportCards, shouldHaveCombinedReportDataTestIds, shouldOpenCSVEditorDialog, shouldOpenCSVEditorForUserMetadataReport, shouldSaveEditedCSVAndTriggerDownload, shouldShowCombiningReportsDialog, shouldVerifyCSVEditorDialogAccessibility, signUpWithEmailAndPassword, spendLimitsTabBody, startEvaluation, startHistoryExport, submitAddCreditsAmount, submitLinkModal, submitLlmJudge, submitToolModal, switchHistorySubTab, switchToAddItemsSubTab, switchToAgentLimits, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, switchToEvaluationTab, switchToGraderSubTab, switchToGraderTab, switchToLtiSubTab, switchToLtiTab, switchToMemoryAdminSubTab, switchToMemoryTab, switchToPlanAndCredits, switchToPrivacyTab, switchToPrivateModeTab, switchToSandboxTab, switchToScreenShareTab, switchToSkillResourcesSubTab, switchToSkillsTab, switchToSpendLimitsSubTab, switchToSpendLimitsTab, switchToSupportTab, switchToTasksTab, switchToTenantMemoryTab, switchToUserLimits, switchToVoiceSubTab, switchToVoiceTab, switchToWorkspaceSpendLimits, teardownSandboxInstance, test, toggleAutoPush, toggleMemorySwitch, toggleSandboxKind, toggleSkill, toggleUserMemoryAdminSetting, toolFields, turnOffChatPrivacyMidSession, uploadAssetResource, uploadQaCsv, userLimitsRow, userLimitsSection, userSpendLimitRow, verifyAgentConfigPromptsVisible, verifyAgentSkillsEmptyState, verifyAuditLogEmptyState, verifyAuditLogEntryStructure, verifyAuditLogGenericError, verifyAuditLogLoading, verifyAuditLogPermissionError, verifyAuditLogTableVisible, verifyClawSectionHidden, verifyClawSectionVisible, verifyConnectDisabledForUnhealthy, verifyConnectedInstanceCard, verifyCurrentPage, verifyDonePhase, verifyDownloadingPhase, verifyErrorPhase, verifyInstanceTableEmpty, verifyInstanceTableVisible, verifyMemoryExists, verifyMemoryNotExists, verifyMemoryTabMemoriesList, verifyMemoryTabSettings, verifyPreparingPhase, verifySandboxKindsVisible, verifySkillAdded, verifySkillVisible, verifySkillsEmptyState, verifySkillsTabVisible, waitForAgentChatResponse, waitForAuditLogDataLoaded, waitForBillingTabReady, waitForCompletedExportRow, waitForConversations, waitForCreditBalanceLoaded, waitForDialogReady, waitForElementStable, waitForLinkReady, waitForPageLoad, waitForPageReady, waitForPlanPicker, waitForReportDownload, waitForTicketInList, workspaceSpendLimitSection };
|
|
9041
9140
|
//# sourceMappingURL=index.esm.js.map
|