Skip to content

Commit 281c72f

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 67e5d34 + 1293523 commit 281c72f

File tree

9 files changed

+39
-3
lines changed

9 files changed

+39
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
- name: Run E2E tests
4949
env:
5050
NEXT_PUBLIC_API_URL: localhost:8088
51-
NEXT_PUBLIC_FIREBASE_ENV: PROD
51+
NEXT_PUBLIC_FIREBASE_ENV: DEV
5252
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
5353
NEXT_PUBLIC_SUPABASE_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_KEY }}
5454
run: |
5555
yarn --cwd=web serve &
5656
npx wait-on http://localhost:3000
57-
npx playwright test tests/playwright
57+
npx playwright test tests/e2e
5858
SERVER_PID=$(fuser -k 3000/tcp)
5959
echo $SERVER_PID
6060
kill $SERVER_PID

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# testing
1414
/coverage
1515

16+
# Playwright
17+
/tests/reports/playwright-report
18+
1619
# next.js
1720
/.next/
1821
/out/

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"sync-android": "./scripts/sync_android.sh",
2222
"migrate": "./scripts/migrate.sh",
2323
"test": "jest",
24+
"playwright": "playwright test",
25+
"playwright:ui": "playwright test --ui",
26+
"playwright:debug": "playwright test --debug",
27+
"playwright:report": "npx playwright show-report tests/reports/playwright-report",
2428
"test:watch": "jest --watch",
2529
"test:coverage": "jest --coverage",
2630
"test:update": "jest --updateSnapshot",

playwright.config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: './tests/e2e',
5+
fullyParallel: true,
6+
forbidOnly: !!process.env.CI,
7+
retries: process.env.CI ? 2 : 0,
8+
workers: process.env.CI ? 1 : undefined,
9+
reporter: [['html', {outputFolder: `tests/reports/playwright-report`, open: 'on-falure'}]],
10+
use: {
11+
baseURL: 'http://localhost:3000',
12+
trace: 'on-first-retry',
13+
},
14+
projects: [
15+
{
16+
name: 'chromium',
17+
use: { ...devices['Desktop Chrome'] },
18+
},
19+
// {
20+
// name: 'firefox',
21+
// use: { ...devices['Desktop Firefox'] },
22+
// },
23+
// {
24+
// name: 'webkit',
25+
// use: { ...devices['Desktop Safari'] },
26+
// },
27+
],
28+
});

tests/e2e/web/.auth/.keep

Whitespace-only changes.

tests/e2e/web/components/.keep

Whitespace-only changes.

tests/e2e/web/pages/.keep

Whitespace-only changes.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import {expect, test} from '@playwright/test';
22

33
test('shows', async ({page}) => {
4-
// await page.goto('http://localhost:3000/profile'); // Adjust this to your route
4+
await page.goto('/'); // Adjust this to your route
5+
expect(await page.title()).toBe('Compass');
56
//
67
// const spinner = page.locator('[data-testid="spinner"]');
78
// await expect(spinner).toBeVisible();

tests/e2e/web/utils/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)