Skip to content
Merged
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
32 changes: 30 additions & 2 deletions .github/workflows/cypress-marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down Expand Up @@ -481,4 +509,4 @@ jobs:
if: always()
with:
name: screenshots
path: cypress-tests/cypress/screenshots
path: cypress-tests/cypress/screenshots
Loading