update seeding (#15679)

This commit is contained in:
Midhun Kumar E 2026-03-25 13:40:04 +11:00 committed by GitHub
parent d963256e66
commit ea8f4b03a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -349,7 +349,7 @@ jobs:
- name: Seeding (Setup Super Admin)
run: |
curl 'http://localhost:3000/api/onboarding/setup-super-admin' \
curl --fail-with-body 'http://localhost:3000/api/onboarding/setup-super-admin' \
-H 'Content-Type: application/json' \
--data-raw '{
"companyName": "ToolJet",
@ -359,6 +359,34 @@ jobs:
"password": "password"
}'
- name: Seeding (Authenticate)
run: |
AUTH_RESPONSE=$(curl --fail-with-body \
-c /tmp/tj_cookies.txt \
'http://localhost:3000/api/authenticate' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "dev@tooljet.io",
"password": "password"
}')
echo "$AUTH_RESPONSE"
# Extract org ID and export for the next step via GITHUB_ENV
ORG_ID=$(echo "$AUTH_RESPONSE" | jq -r '.current_organization_id')
echo "TJ_ORG_ID=$ORG_ID" >> $GITHUB_ENV
- name: Seeding (Complete Onboarding)
run: |
# Sets onboarding_status = onboarding_completed so the frontend does not
# redirect every page visit to /setup, which would break all UI tests.
# tj-workspace-id header is required by JwtStrategy to resolve the user.
curl --fail-with-body \
-b /tmp/tj_cookies.txt \
-X POST \
'http://localhost:3000/api/onboarding/finish' \
-H 'Content-Type: application/json' \
-H "tj-workspace-id: $TJ_ORG_ID" \
--data-raw '{"region": "us"}'
- name: Create Cypress environment file
id: create-json
uses: jsdaniell/create-json@1.1.2
@ -481,4 +509,4 @@ jobs:
if: always()
with:
name: screenshots
path: cypress-tests/cypress/screenshots
path: cypress-tests/cypress/screenshots