Skip to content

test(e2e): cover default user budget administration - #1078

Draft
saurya wants to merge 1 commit into
mainfrom
e2e/admin-default-user-budget
Draft

test(e2e): cover default user budget administration#1078
saurya wants to merge 1 commit into
mainfrom
e2e/admin-default-user-budget

Conversation

@saurya

@saurya saurya commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Migration

Ports https://github.com/OpenHands/saas-deploy/pull/588 from OpenHands/saas-deploy so the test ships with the OpenHands-Cloud chart release it validates.

This pull request is based directly on main, which includes the foundational Playwright harness from OpenHands-Cloud #1048.

Original scenario contract

Summary

  • add one Playwright spec containing one test for the default new-user organization budget
  • use the current /settings/budgets route, Default budgets tab, and #default-budget-amount control
  • verify both the UI-triggered PATCH response and persisted API state

Validation

  • npm --prefix e2e_tests run typecheck
  • cd e2e_tests && npx eslint tests/admin-default-user-budget.spec.ts
  • cd e2e_tests && npx prettier --check tests/admin-default-user-budget.spec.ts
  • cd e2e_tests && npx playwright test tests/admin-default-user-budget.spec.ts --list

Environment contract

  • e2e_tests/fixtures/auth.json: organization admin/owner with a non-personal organization selected
  • BASE_URL: target OpenHands Enterprise deployment
  • missing authentication, personal-organization selection, or insufficient role throws a clear error rather than skipping

Cleanup and risk

  • generates a unique positive decimal limit for the run
  • restores the exact previous default_user_monthly_limit in finally, including null
  • asserts cleanup response and restored value softly so the original failure remains visible
  • run serially against a dedicated test organization because shared budget state changes temporarily

AI-agent disclosure: This draft PR was created by OpenHands on behalf of the user.

Port validation

  • Exactly one changed file: e2e_tests/tests/admin-default-user-budget.spec.ts.
  • Exactly one Playwright test in the spec.
  • Focused ESLint and Prettier checks passed.
  • tsc --noEmit passed against the Cloud harness.
  • Chromium Playwright --list discovery passed.
  • Live execution still requires the explicit authentication and TEST_* contracts documented above.

AI disclosure: This pull request was migrated by an AI agent (OpenHands) on behalf of the user.

@github-actions github-actions Bot added the type: test Adding or fixing tests label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: test Adding or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant