Skip to content

Commit 414cd41

Browse files
trz-21claude
andcommitted
fix: 랜딩 스모크 E2E 추가로 Frontend CI 'No tests found' 해결
playwright testDir(tests/e2e)가 비어 있어 npx playwright test가 exit 1 → 모든 Frontend CI가 red였다. 공개 랜딩 페이지(/)에 대한 백엔드 불필요 스모크 테스트 3건을 추가해 최소 1건 이상의 E2E가 존재하도록 한다. playwright 산출물 디렉토리도 gitignore 처리. Closes #30 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3b7291c commit 414cd41

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

frontend/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ yarn-error.log*
3434
# typescript
3535
*.tsbuildinfo
3636
next-env.d.ts
37+
38+
# playwright
39+
/test-results/
40+
/playwright-report/
41+
/playwright/.cache/

frontend/tests/e2e/landing.spec.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
/**
4+
* 랜딩 페이지 스모크 테스트.
5+
*
6+
* 미인증 방문자가 루트(/)에 접속하면 랜딩 페이지가 렌더되고,
7+
* 핵심 카피·CTA·주요 섹션이 노출되는지 확인한다. 공개 페이지이므로
8+
* 백엔드 없이 프론트 dev 서버만으로 검증 가능하다.
9+
*/
10+
test.describe('랜딩 페이지', () => {
11+
test('히어로 카피와 가입 CTA가 노출된다', async ({ page }) => {
12+
await page.goto('/');
13+
14+
// 히어로 헤드라인
15+
await expect(
16+
page.getByRole('heading', {
17+
name: '리뷰가 알려주는 경쟁사를 이기는 법',
18+
level: 1,
19+
})
20+
).toBeVisible();
21+
22+
// 가입/로그인 진입점 (네비바 + 히어로에 복수 존재)
23+
await expect(
24+
page.getByRole('link', { name: '로그인' }).first()
25+
).toBeVisible();
26+
await expect(
27+
page.getByRole('button', { name: '무료로 시작' }).first()
28+
).toBeVisible();
29+
});
30+
31+
test('주요 섹션 헤딩이 모두 렌더된다', async ({ page }) => {
32+
await page.goto('/');
33+
34+
for (const name of ['핵심 가치', '작동 방식', '신뢰할 수 있는 분석', '요금제']) {
35+
await expect(page.getByRole('heading', { name, level: 2 })).toBeVisible();
36+
}
37+
});
38+
39+
test('가입 CTA가 회원가입 페이지로 연결된다', async ({ page }) => {
40+
await page.goto('/');
41+
42+
await page
43+
.getByRole('main')
44+
.getByRole('link', { name: '무료로 시작하기' })
45+
.first()
46+
.click();
47+
48+
await expect(page).toHaveURL(/\/register$/);
49+
});
50+
});

0 commit comments

Comments
 (0)