Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scenarios/user-journey/negative-form-lifecycle/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ BASE_URL=http://127.0.0.1:4010
# User ID for internal login (debug authentication)
# This should be a valid UUID of a user in the system
LOGIN_USER_ID=00000000-0000-0000-0000-000000000001

# User ID for non-member 403 test (seeded via backend setup.yaml)
NON_MEMBER_LOGIN_USER_ID=b1c2d3e4-f5a6-7890-abcd-ef1234567890
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,43 @@

###

# ============================================
# Login as non-member user (not in org-403-test)
# ============================================
# Org creation adds the global admin as org admin; use a separate user for the 403 test.
# @name loginNonMember
# @ref getOrgFor403Test
POST {{BASE_URL}}/auth/login/internal
Content-Type: application/json

{
"uid": "{{NON_MEMBER_LOGIN_USER_ID}}"
}

?? status == 200

###

# ============================================
# Create form under org before user is a member (expect 403)
# ============================================
# Uses org from organization-lifecycle: org exists but current user is not a member.
# @name createFormBeforeMember
# @ref createOrgFor403Test
# @ref loginNonMember
POST {{BASE_URL}}/orgs/{{orgSlugNotMember}}/forms
Content-Type: application/json

{
"title": "Should Be Forbidden",
"description": "User not yet a member",
"description": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "User not yet a member" }]
}
]
},
"visibility": "PUBLIC"
}

Expand All @@ -41,11 +66,27 @@ Content-Type: application/json

###

# ============================================
# Re-login as global admin for cleanup
# ============================================
# @name adminLoginForCleanup
# @ref createFormBeforeMember
POST {{BASE_URL}}/auth/login/internal
Content-Type: application/json

{
"uid": "{{LOGIN_USER_ID}}"
}

?? status == 200

###

# ============================================
# Get User Email
# ============================================
# @name getUserEmail
# @ref createFormBeforeMember
# @ref adminLoginForCleanup
GET {{BASE_URL}}/users/me

?? status == 200
Expand Down
3 changes: 3 additions & 0 deletions scenarios/user-journey/organization-lifecycle/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ BASE_URL=http://127.0.0.1:4010
# If you see a 404 "user not found" error, it means the LOGIN_USER_ID is invalid.
# You must provide a real user UUID from your database/system.
LOGIN_USER_ID=00000000-0000-0000-0000-000000000001

# User ID for non-member 403 test (seeded via backend setup.yaml)
NON_MEMBER_LOGIN_USER_ID=b1c2d3e4-f5a6-7890-abcd-ef1234567890
Loading