Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bdcf07b
add initial workflow
aambrose1 Mar 28, 2026
0da4b9e
added playwright smoke tests
aambrose1 Mar 28, 2026
4734fe4
edit react runner
aambrose1 Mar 28, 2026
5c25bc8
Merge branch 'main' into test/e2e
aambrose1 Apr 5, 2026
9a9b48d
moved into e2e folder
aambrose1 Apr 5, 2026
f7fc404
doc: test plan for structured tests
aambrose1 Apr 5, 2026
fe0efef
added registration tests
aambrose1 Apr 5, 2026
db38c31
fix: add wait for URL
aambrose1 Apr 5, 2026
b12ff8c
update workflow for storing auth state
aambrose1 Apr 8, 2026
b28d60d
correct landing page
aambrose1 Apr 8, 2026
607b808
fixes configuration for test environment vars :D
aambrose1 Apr 8, 2026
d0870ff
yml update
aambrose1 Apr 8, 2026
b45aef9
yml update fix
aambrose1 Apr 8, 2026
1e2e676
fix client variable name in spec
aambrose1 Apr 8, 2026
4603a04
add env vars for root in yml
aambrose1 Apr 8, 2026
b220e0a
fix: clean up users before tests
aambrose1 Apr 8, 2026
5643a2e
replace redundant wait
aambrose1 Apr 8, 2026
8ec159f
adds debug for failing test
aambrose1 Apr 8, 2026
81eccf3
remove duplicate create acc
aambrose1 Apr 9, 2026
f0f8915
adds azure storage for playwright-report html
aambrose1 Apr 9, 2026
398f5a5
fix link in yml
aambrose1 Apr 9, 2026
aa53692
Merge branch 'main' into test/e2e
aambrose1 Apr 20, 2026
885ea7f
added login test
aambrose1 Apr 20, 2026
2bcdaa7
password reset test
aambrose1 Apr 25, 2026
a9edb03
update setup to make new isolated user every run
aambrose1 Apr 25, 2026
3d67829
change email domain to prevent bounceback
aambrose1 Apr 25, 2026
a217edb
fix success msg racing
aambrose1 Apr 30, 2026
b2f1442
profile (account) tests
aambrose1 Apr 30, 2026
02486d5
adding family members tests
aambrose1 Apr 30, 2026
4617a6a
fix client start cmd
aambrose1 Apr 30, 2026
7f95e9b
update ci/dev cmds
aambrose1 Apr 30, 2026
1c59ef3
added event test
aambrose1 Apr 30, 2026
1b5bcaa
revert client start + update docs
aambrose1 Apr 30, 2026
a846036
Merge branch 'main' into test/e2e
aambrose1 May 1, 2026
2617665
test to debug relationship api error
aambrose1 May 1, 2026
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
83 changes: 83 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: End-to-End Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
e2e-testing:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.19.4'

- name: Install Dependencies
run: |
npm install -g wait-on
npm ci
cd client && npm ci
cd ../server && npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Start Express Server
env:
SUPABASE_URL: ${{ secrets.TEST_SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.TEST_SUPABASE_SERVICE_ROLE_KEY }}
PORT: 5000
run: |
cd server
npm run start:ci-test &
wait-on http://localhost:5000

- name: Start React Client
env:
REACT_APP_SUPABASE_URL: ${{ secrets.TEST_SUPABASE_URL }}
REACT_APP_SUPABASE_ANON_KEY: ${{ secrets.TEST_SUPABASE_ANON_KEY }}
PORT: 3000
run: |
cd client
npm run start:ci-test &
wait-on http://localhost:3000

- name: Run Playwright Tests
run: npx playwright test
env:
SUPABASE_URL: ${{ secrets.TEST_SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.TEST_SUPABASE_SERVICE_ROLE_KEY }}

- name: Upload HTML report to Azure
if: always()
shell: bash
run: |
# Creates a unique folder name for this specific test run
REPORT_DIR='run-${{ github.run_id }}-${{ github.run_attempt }}'

# Uploads the report to the $web container
azcopy cp --recursive "./playwright-report/*" "https://kintree2026.blob.core.windows.net/\$web/$REPORT_DIR"

# Prints a clickable link in the GitHub Actions logs
echo "::notice title=HTML report url::https://kintree2026.z13.web.core.windows.net/$REPORT_DIR/index.html"
env:
AZCOPY_AUTO_LOGIN_TYPE: SPN
AZCOPY_SPA_APPLICATION_ID: '${{ secrets.AZCOPY_SPA_APPLICATION_ID }}'
AZCOPY_SPA_CLIENT_SECRET: '${{ secrets.AZCOPY_SPA_CLIENT_SECRET }}'
AZCOPY_TENANT_ID: '${{ secrets.AZCOPY_TENANT_ID }}'

- name: Upload Playwright Report to GitHub Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ web_modules/
.env
.env.development.local
.env.test.local
.env.test
.env.production.local
.env.local

Expand Down Expand Up @@ -138,3 +139,10 @@ dist
.yarn/install-state.gz
.pnp.*
client/src/components/AddToTree/sample-data.json

# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,35 @@ Then, from the same directory, run the following command to run the server/API:

`node server.js`

### Testing

This project uses a separate test database to run tests against. Therefore, make sure to paste in the proper env variables.

Paste `TEST_SUPABASE_URL` and `TEST_SUPABASE_SERVICE_ROLE_KEY` into a .env.test file in the root directory of the project.

Additionally, add `REACT_APP_SUPABASE_URL` and `REACT_APP_SUPABASE_ANON_KEY` to a .env.test file in the /client/ directory.

Finally, `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY` should be added to the .env.test file in the /server/ directory as well.

Tree structure:
```
/SeniorProject_KinTree
/client
.env.test
/server
.env.test
.env.test
```

Move into the /server/ directory and run `npm run start:dev-test` to setup the auth storage and test environment.

Cd into the /client/ directory and run `npm run start:dev-test` to start the frontend in test mode.

Then, navigate back to the /SeniorProject_KinTree/ root directory and run:

`npm run test`
### Emails setup

Follow the steps on [sending emails with Resend](https://github.com/resend/resend-examples/tree/main/express-resend-examples) to verify your domain and obtain your RESEND_API_KEY to store in `.env`.

Set EMAIL_FROM in `.env`.
Set EMAIL_FROM in `.env`.
Loading
Loading