test(e2e): add enterprise settings workflows#5849
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds deterministic enterprise settings workflows and strengthens their application states. The main changes are:
Confidence Score: 4/5The combined permission-config error path can hide valid member data and management controls.
apps/sim/hooks/use-permission-config.ts and apps/sim/e2e/scripts/seed-world.ts Important Files Changed
Reviews (1): Last reviewed commit: "test(e2e): add enterprise workflow cover..." | Re-trigger Greptile |
| const isLoading = isPermissionLoading || isEnvAllowlistLoading | ||
| const isError = isPermissionError || isEnvAllowlistError |
There was a problem hiding this comment.
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)
| const teamTarget = world.records.users.get('team-workflow-member') | ||
| const enterpriseTarget = world.records.users.get('enterprise-workflow-member') | ||
| if (!teamTarget || !enterpriseTarget) return |
There was a problem hiding this comment.
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.
| 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') |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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>
1afa5d3
into
e2e/settings-playwright

Summary
Verification
Made with Cursor