Skip to content

test(e2e): add enterprise settings workflows#5849

Merged
BillLeoutsakosvl346 merged 2 commits into
e2e/settings-playwrightfrom
e2e/06-enterprise-workflows
Jul 22, 2026
Merged

test(e2e): add enterprise settings workflows#5849
BillLeoutsakosvl346 merged 2 commits into
e2e/settings-playwrightfrom
e2e/06-enterprise-workflows

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • add deterministic Team and Enterprise workflow personas with trusted seat, membership, permission, and restricted-group invariants
  • add token-safe workspace invitation, organization invitation, real-member lifecycle, and dynamic permission-group browser workflows with exact baseline restoration
  • harden teammates, organization members, and access-control loading/error states, semantic locators, mutation cache coherence, and stale-dialog behavior
  • enforce workflow artifact safety and zero-provider mail semantics, and document Step 6 ownership and execution

Verification

  • affected Vitest suites
  • Sim TypeScript type-check
  • full Biome lint and diff whitespace checks
  • strict API validation, monorepo/client-boundary, and React Query audits
  • focused Step 6 workflow project
  • authorization regression suite and exact readiness regression
  • complete Playwright dependency chain through hosted-billing-chromium-personas
  • two fresh Claude/GPT implementation-review rounds, both accepted

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 22, 2026 5:39pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds deterministic enterprise settings workflows and strengthens their application states. The main changes are:

  • Adds Team and Enterprise workflow personas with repeatable seed invariants.
  • Adds invitation, member lifecycle, and permission-group browser workflows.
  • Adds explicit loading, error, and ready states to settings screens.
  • Improves accessible locators and mutation cache invalidation.
  • Adds artifact and mail-provider safety checks for workflow runs.

Confidence Score: 4/5

The combined permission-config error path can hide valid member data and management controls.

  • An integration-allowlist failure is presented as a total member-loading failure.
  • Seed validation can silently skip all new workflow invariants when one required persona is absent.
  • The remaining workflow cleanup and readiness changes are narrowly scoped and defensive.

apps/sim/hooks/use-permission-config.ts and apps/sim/e2e/scripts/seed-world.ts

Important Files Changed

Filename Overview
apps/sim/hooks/use-permission-config.ts Adds error propagation but merges failures from independent permission and integration queries.
apps/sim/e2e/scripts/seed-world.ts Adds workflow baseline checks but skips all of them when either required persona is missing.
apps/sim/app/workspace/[workspaceId]/settings/components/team-management/team-management.tsx Adds fail-closed member readiness, management guards, and stale-dialog cleanup.
apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx Adds explicit query-state handling, accessible regions, and organization-aware mutation inputs.
apps/sim/ee/access-control/components/access-control.tsx Adds explicit loading, error, denied, and ready states for Access Control.
apps/sim/e2e/settings/workflows/helpers.ts Adds API helpers, cleanup operations, and exact workflow baseline restoration.
apps/sim/e2e/settings/workflows/people.spec.ts Adds workspace invitation, organization invitation, and real-member lifecycle coverage.
apps/sim/e2e/settings/workflows/access-control.spec.ts Adds dynamic permission-group restriction and restoration coverage.

Reviews (1): Last reviewed commit: "test(e2e): add enterprise workflow cover..." | Re-trigger Greptile

Comment on lines 85 to +86
const isLoading = isPermissionLoading || isEnvAllowlistLoading
const isError = isPermissionError || isEnvAllowlistError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Unrelated Error Hides Member Data

isError combines permission-group failures with integration-allowlist failures, while the new Teammates and Team Management consumers treat it as a failure to load all member data. If the allowlist request fails while roster and permission data are available, both screens hide their loaded members and management controls behind an unrelated error state.

Context Used: Custom hook patterns and best practices (source)

Comment thread apps/sim/e2e/scripts/seed-world.ts Outdated
Comment on lines +648 to +650
const teamTarget = world.records.users.get('team-workflow-member')
const enterpriseTarget = world.records.users.get('enterprise-workflow-member')
if (!teamTarget || !enterpriseTarget) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Missing Persona Skips All Invariants

If either required workflow persona is absent, this return skips every new seat, membership, permission, and restricted-group check. A partially seeded world therefore passes validation and fails later in the browser workflows instead of reporting the missing required record at seed time.

Suggested change
const teamTarget = world.records.users.get('team-workflow-member')
const enterpriseTarget = world.records.users.get('enterprise-workflow-member')
if (!teamTarget || !enterpriseTarget) return
const teamTarget = world.records.users.get('team-workflow-member')
if (!teamTarget) throw new Error('Missing required team workflow member')
const enterpriseTarget = world.records.users.get('enterprise-workflow-member')
if (!enterpriseTarget) throw new Error('Missing required Enterprise workflow member')

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7bba0b7. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@BillLeoutsakosvl346
BillLeoutsakosvl346 merged commit 1afa5d3 into e2e/settings-playwright Jul 22, 2026
19 checks passed
@waleedlatif1
waleedlatif1 deleted the e2e/06-enterprise-workflows branch July 22, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant