Skip to content

Commit 73fff4d

Browse files
committed
add e2e workflow
1 parent 38a7a1d commit 73fff4d

File tree

2 files changed

+54
-14
lines changed

2 files changed

+54
-14
lines changed

.github/workflows/e2e.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: End-to-End Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
e2e-tests:
11+
name: Run E2E Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '22'
25+
26+
- name: Start LocalStack
27+
uses: LocalStack/setup-localstack@main
28+
with:
29+
image-tag: 'latest'
30+
use-pro: 'true'
31+
configuration: LS_LOG=trace
32+
install-awslocal: 'true'
33+
env:
34+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
35+
36+
- name: Deploy infrastructure
37+
run: |
38+
./bin/deploy.sh
39+
40+
- name: Install Playwright
41+
run: |
42+
cd tests/e2e
43+
pip install -r requirements.txt
44+
playwright install chromium
45+
playwright install-deps chromium
46+
47+
- name: Run E2E Tests
48+
run: |
49+
cd tests/e2e
50+
pytest -s test_quiz_flow.py
51+
env:
52+
AWS_DEFAULT_REGION: us-east-1
53+
AWS_ACCESS_KEY_ID: test
54+
AWS_SECRET_ACCESS_KEY: test

tests/e2e/test_quiz_flow.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,6 @@ def test_quiz_flow(page, app_url):
124124
found_user = True
125125
break
126126

127-
# Take screenshot for debugging
128-
if not found_user:
129-
print("Taking screenshot for debugging...")
130-
page.screenshot(path="leaderboard-debug.png")
131-
132-
# Print all entries for debugging
133-
print("\nAll podium entries:")
134-
for entry in podium_entries:
135-
print(entry.text_content())
136-
print("\nAll list entries:")
137-
for entry in list_entries:
138-
print(entry.text_content())
139-
print(f"\nLooking for username: {username}")
140-
141127
assert found_user, "User not found in leaderboard"
142128

143129
def test_quiz_creation(page, app_url):

0 commit comments

Comments
 (0)